[GH-ISSUE #2735] No status after "kill -SIGUSR1 pid" in Ubuntu when running with --stdin or --pipe #1758

Closed
opened 2026-10-15 04:24:05 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @anderhil on GitHub (Sep 7, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2735

Hello,

I am quite new to the JohnTheRipper and maybe I am doing something wrong but I run this Python code:

p = Popen(['/run/john',"--format=ethereum-presale-opencl", "--pipe", "pws.hash"], stdin=PIPE, stdout=PIPE, stderr=STDOUT, shell=False)

print p.stdout.readline()
print p.stdout.readline()
print p.stdout.readline()
print p.stdout.readline()

Outputs this:

Device 0: GeForce GTX 1070

Using default input encoding: UTF-8

Loaded 1 password hash (ethereum-presale-opencl, Ethereum Presale Wallet [PBKDF2-SHA256 AES OpenCL])

Press Ctrl-C to abort, or send SIGUSR1 to john process for status

I run some custom password generation algorithm written in Python:

 for i in range(0, 100000000):
        p.stdin.write('pwd' + str(i) + '\n')

The CPU in the resources monitor shows spikes, and load on the cores -> seems like john is running.

However when I do any of these:

  • in seperate Terminal send manually sudo kill -SIGUSR1 pid or kill -10 pid or kill -s USR1 pid
  • call in Python os.kill(pid, 10) or os.kill(pid, signal.SIGUSR1)
  • call p.send_signal(signal.SIGUSR1)

and then try to read stdout in either print p.stdout.readline() or print p.stdout.read(1)
it blocks and nothing happens as like john didn't receive any signal.

I tried to run in separate terminal just kill pid and then print p.stdout.readline() unblocks and I receive Session aborted

Originally created by @anderhil on GitHub (Sep 7, 2017). Original GitHub issue: https://github.com/openwall/john/issues/2735 Hello, I am quite new to the JohnTheRipper and maybe I am doing something wrong but I run this Python code: ``` p = Popen(['/run/john',"--format=ethereum-presale-opencl", "--pipe", "pws.hash"], stdin=PIPE, stdout=PIPE, stderr=STDOUT, shell=False) print p.stdout.readline() print p.stdout.readline() print p.stdout.readline() print p.stdout.readline() ``` Outputs this: ``` Device 0: GeForce GTX 1070 Using default input encoding: UTF-8 Loaded 1 password hash (ethereum-presale-opencl, Ethereum Presale Wallet [PBKDF2-SHA256 AES OpenCL]) Press Ctrl-C to abort, or send SIGUSR1 to john process for status ``` I run some custom password generation algorithm written in Python: ``` for i in range(0, 100000000): p.stdin.write('pwd' + str(i) + '\n') ``` The CPU in the resources monitor shows spikes, and load on the cores -> seems like john is running. However when I do any of these: - in seperate Terminal send manually `sudo kill -SIGUSR1 pid` or `kill -10 pid` or `kill -s USR1 pid` - call in Python `os.kill(pid, 10)` or `os.kill(pid, signal.SIGUSR1)` - call `p.send_signal(signal.SIGUSR1)` and then try to read stdout in either `print p.stdout.readline()` or `print p.stdout.read(1)` it blocks and nothing happens as like john didn't receive any signal. I tried to run in separate terminal just `kill pid` and then `print p.stdout.readline()` unblocks and I receive `Session aborted`
bsakaguchi 2026-10-15 04:24:05 +07:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@magnumripper commented on GitHub (Sep 7, 2017):

This is an invalid topic for a GitHub issue. We discuss bugs and new features here. You should discuss this on john-users mailing list. Or perhaps john-dev, given you try to code some wrapper.

Having said that, what you see is JtR blocking for input on stdin until it has enough candidates to run a batch of them on GPU.
Try sending that USR1, and then, before expecting an answer, send enough candidates on stdin to get the "load spike" you mention. The status will be printed only after a batch is processed.

<!-- gh-comment-id:327733870 --> @magnumripper commented on GitHub (Sep 7, 2017): This is an invalid topic for a GitHub issue. We discuss bugs and new features here. You should discuss this on john-users mailing list. Or perhaps john-dev, given you try to code some wrapper. Having said that, what you see is JtR blocking for input on stdin until it has enough candidates to run a batch of them on GPU. Try sending that USR1, and **then**, before expecting an answer, send enough candidates on stdin to get the "load spike" you mention. The status will be printed only after a batch is processed.
Author
Owner

@roycewilliams commented on GitHub (Sep 7, 2017):

In @anderhil's defense, the observed behavior could have been a bug (as far as they knew). I think that it's understandable that it was initially reported here. 😄

<!-- gh-comment-id:327825442 --> @roycewilliams commented on GitHub (Sep 7, 2017): In @anderhil's defense, the observed behavior could have been a bug (as far as they knew). I think that it's understandable that it was initially reported here. :smile:
Author
Owner

@magnumripper commented on GitHub (Sep 7, 2017):

Sure, I have seen much dumber issues for sure. And I have banned people forever several times for opening stupid fuk issues that just eat our time, but this was not the case here at all. No offense please, and none taken here. Peace, love and understanding, and all 🌷 😆

<!-- gh-comment-id:327940510 --> @magnumripper commented on GitHub (Sep 7, 2017): Sure, I have seen **much** dumber issues for sure. And I have banned people forever several times for opening stupid fuk issues that just eat our time, but this was not the case here at all. No offense please, and none taken here. Peace, love and understanding, and all 🌷 😆
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1758
No description provided.