Pushing causes python crash, but push succeeds

Issue #283 invalid
Matt Oswald created an issue

When I push, I get the following printed on my local console:

{{{ pushing to https://hg.company.com/server/project searching for changes remote: Traceback (most recent call last): remote: File "c:\Python\2.6\Lib\logging__init.py", line 800, in emit remote: self.flush() remote: File "c:\Python\2.6\Lib\logging__init.py", line 762, in flush remote: self.stream.flush() remote: IOError: [Errno 9] Bad file descriptor remote: Repository size .hg:18.0 kB repo:0 B total:18.0 kB }}}

The server is running 1.2.2 on Windows Server 2008.

Comments (8)

  1. Marcin Kuzminski repo owner

    Is this a reproducible case for you ?

    try disabling Show repository size after push in admin

  2. Matt Oswald reporter

    It is 100% reproducible: every push, every time. Turning off showing the repo size doesn't seem to change anything. The only thing that removes those errors is the "log user push commands" setting.

  3. Marcin Kuzminski repo owner

    Can you pinpoint what lines/s are causing this in rhodecode.lib.hooks log_push_action() method ?

  4. Matt Oswald reporter

    It doesn't seem to happen when running from the commandline ("paster serve --log-file=log.txt .\production.ini"), only when run as a service. I'm thinking it's probably a permissions issue, or maybe the logfile section of production.ini isn't set up properly.

    I'm not a paster expert, I don't really know where to begin in order to get what you're asking for when it's running as a service. Any tips?

  5. Matt Oswald reporter

    Well, commenting out the call to action_logger removes the crash, if that helps. I'll dig further.

    Likewise, going into utils.py and removing the call to log.info also removes the crash.

  6. Marcin Kuzminski repo owner

    ok nice, that you pinpointed exact spot of error. but now a question is why your windows python crashes on log.info call. That's something pure pythonic. Check your logger settings.

  7. Matt Oswald reporter

    (Reply via mos...@gmail.com):

    Ok, that makes sense. Can you tell me where it is *supposed* to be writing that log? I'm assuming there's a permissions error, or the file can't be created, or something like that.

  8. Matt Oswald reporter

    Nevermind. I have now learned that Windows Services don't like writing to stderr (apparently). I set up a rotating log file handler as a replacement.

  9. Log in to comment