Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests leave running processes #7

Closed
menesis opened this issue May 12, 2014 · 8 comments
Closed

Tests leave running processes #7

menesis opened this issue May 12, 2014 · 8 comments

Comments

@menesis
Copy link
Member

menesis commented May 12, 2014

After tests are run, two processes are running:

$ ps uxa | grep zdaemon
menesis  13797  0.0  0.2 123868  8848 ?        Ssl  16:43   0:00 /home/menesis/src/zope/zdaemon/python/bin/python ./zdaemon -S /home/menesis/src/zope/zdaemon/src/zdaemon/schema.xml -C conf tail -f data
menesis  13805  0.0  0.2 118208  7800 ?        Ssl  16:43   0:00 /home/menesis/src/zope/zdaemon/python/bin/python /home/menesis/src/zope/zdaemon/src/zdaemon/zdrun.py -d -b 10 -s /tmp/tmpfBlZIn/testsock -x 0,2 -z /home/menesis/src/zope/zdaemon/src/zdaemon/tests /tmp/tmpfBlZIn/donothing.sh

They should be stopped in test cleanup.

@mgedmin
Copy link
Member

mgedmin commented May 12, 2014

Also reported at https://bugs.launchpad.net/zdaemon/+bug/1125294

@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2015

I cannot reproduce this any more with current master.

@mgedmin mgedmin closed this as completed Apr 15, 2015
@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2015

My mistake, I fumbled the pgrep command line (hint it's pgrep -f zdaemon, not pgrep zdaemon).

@mgedmin mgedmin reopened this Apr 15, 2015
@mgedmin mgedmin closed this as completed Apr 15, 2015
@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2015

For extra bonus points this fix improves test coverage 👍

@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2015

Aaaand the bug is back :/

@mgedmin mgedmin reopened this Apr 15, 2015
@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2015

testRunIgnoresParentSignals (zdaemon.tests.testzdrun.ZDaemonTests) leaves one process.

@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2015

Ha ha git bisect claims 37cdbee is responsible.

Therefore I'm pretty sure now that this is non-deterministic.

@mgedmin
Copy link
Member

mgedmin commented Apr 15, 2015

Hahahaa

testRunIgnoresParentSignals does

            # Kill the process.                                                                                                                       
            send_action('exit\n', zdrun_socket)                                                                                                       

Here's how well this works:

29745 sendto(3, "exit\n\n", 6, 0, NULL, 0 <unfinished ...>
29775 accept(3,  <unfinished ...>
29745 <... sendto resumed> )            = 6
29775 <... accept resumed> 0x7ffdaab64e30, 0x7ffdaab64e2c) = 7
29745 shutdown(3, SHUT_WR)              = 0
29745 recvfrom(3,  <unfinished ...>
29775 select(8, [?], [?], [?], {...})   = 1 (left {...})
29775 recvfrom(7, 0x23e28d4, 1000, 0, NULL, NULL) = 6
29775 sendto(7, 0x7f5a44555824, 43, 0, NULL, 0) = 43
29745 <... recvfrom resumed> "Unknown command u'exit'; 'help' "..., 1000, 0, NULL, NULL) = 43

mgedmin added a commit that referenced this issue Apr 15, 2015
'exit' is not a command that zdrun understands.
@mgedmin mgedmin closed this as completed Apr 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants