Python Forum
Why does this hang the system up
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does this hang the system up
#5
If I hit control C multiple times it will finally stop the program. It just takes a while.
Since I now have access to the terminal output I can see there are multiple exception messages.
Perhaps ten or more I think coming from LIB functions and not my code.
Here is a typical example:
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/joblib/_parallel_backends.py", line 350, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/joblib/parallel.py", line 131, in __call__
    return [func(*args, **kwargs) for func, args, kwargs in self.items]
  File "/usr/local/lib/python3.5/dist-packages/joblib/parallel.py", line 131, in <listcomp>
    return [func(*args, **kwargs) for func, args, kwargs in self.items]
  File "pyethrecover3.py", line 79, in attempt
    raise PasswordFoundException("Password Found")
PasswordFoundException: Password Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.5/dist-packages/joblib/_parallel_backends.py", line 359, in __call__
    raise TransportableException(text, e_type)
joblib.my_exceptions.TransportableException: TransportableException
___________________________________________________________________________
PasswordFoundException                             Thu Jun  8 07:14:19 2017
PID: 2409                                    Python 3.5.2: /usr/bin/python3
I suspect that one of the problems may be that the exception is raised from inside a for loop and the loop has to be stopped first. I know that in a Windows program using C# trying to exit a program from inside a loop will cause similar problems.

Here is the loop:

Parallel(n_jobs=-1)(delayed(attempt)(w, pw) for pw in pwds)
It seems to be a combo statement and could it be broken down into separate statements so I will understand it better. I know so little about python syntax.
Reply


Messages In This Thread
Why does this hang the system up - by Able98 - Jun-07-2017, 07:59 PM
RE: Why does this hang the system up - by Ofnuts - Jun-07-2017, 08:25 PM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 12:39 AM
RE: Why does this hang the system up - by Ofnuts - Jun-08-2017, 08:01 AM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 11:44 AM
RE: Why does this hang the system up - by Ofnuts - Jun-08-2017, 12:38 PM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 01:02 PM
RE: Why does this hang the system up - by nilamo - Jun-08-2017, 04:46 PM
RE: Why does this hang the system up - by Able98 - Jun-08-2017, 07:07 PM
RE: Why does this hang the system up - by nilamo - Jun-09-2017, 12:16 AM
RE: Why does this hang the system up - by Able98 - Jun-09-2017, 08:29 AM
RE: Why does this hang the system up - by Able98 - Jun-09-2017, 09:03 PM
RE: Why does this hang the system up - by wavic - Jun-09-2017, 01:45 PM
RE: Why does this hang the system up - by Gil77 - Sep-01-2017, 11:40 AM
RE: Why does this hang the system up - by nilamo - Sep-02-2017, 09:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,798 Jan-11-2021, 06:30 PM
Last Post: ykumar34
  multiprocess hang when certain number is used in the program esphi 7 3,304 Nov-06-2020, 03:49 PM
Last Post: esphi
Question Difference between Python's os.system and Perl's system command Agile741 13 6,994 Dec-02-2019, 04:41 PM
Last Post: Agile741
  Hang man game supermane 2 2,288 Aug-15-2018, 12:07 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020