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

Python segfaults after pyrasite tries to connect #56

Open
robintw opened this issue Dec 24, 2015 · 1 comment
Open

Python segfaults after pyrasite tries to connect #56

robintw opened this issue Dec 24, 2015 · 1 comment

Comments

@robintw
Copy link

robintw commented Dec 24, 2015

I'm using the standard OS X Python version, and when I run pyrasite --verbose 7407 helloworld.py it appears to hang, until I press any key in the window which is running the Python process - at which point the Python process segfaults and I get the following errors from pyrasite:

0x00007fff8c8c83fa in select$DARWIN_EXTSN () from /usr/lib/system/libsystem_kernel.dylib
[Inferior 1 (process 7407) exited normally]


warning: `/BinaryCache/coreTLS/coreTLS-35.40.1~1/Objects/coretls.build/coretls.build/Objects-normal/x86_64/system_coretls_vers.o': can't open to read symbols: No such file or directory.

warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_ciphersuites.a"

warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_handshake.a"

warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_record.a"

warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.40.1~1/Symbols/BuiltProducts/libcoretls_stream_parser.a"
The program being debugged exited while in a function called from GDB.
Evaluation of the expression containing the function
(PyGILState_Ensure) will be abandoned.
You can't do that without a process to debug.
History has not yet reached $1.

Any idea what I'm doing wrong?

@spaceone
Copy link

I also had a segfault when trying to pyrasite-shell:

(gdb) bt
#0  0x00007f9ce17074d0 in __new_sem_wait_fast (sem=sem@entry=0x0, definitive_result=definitive_result@entry=0) at sem_waitcommon.c:135
#1  0x00007f9ce170767b in __new_sem_wait (sem=0x0) at sem_wait.c:26
#2  0x00007f9cd80be838 in PyThread_acquire_lock (lock=0x0, waitflag=<optimized out>) at ../Python/thread_pthread.h:324
#3  0x00007f9cd8135722 in new_threadstate (init=1, interp=0x0) at ../Python/pystate.c:201
#4  0x00007f9cd8135722 in PyThreadState_New (interp=0x0) at ../Python/pystate.c:213
#5  0x00007f9cd80e8c4c in PyGILState_Ensure () at ../Python/pystate.c:600
#6  0x00007ffdb1f1fc3f in <function called from gdb> ()
#7  0x00007f9ce0b138bd in poll () at ../sysdeps/unix/syscall-template.S:84
#8  0x00005614d864c7d6 in poll () at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#9  0x00005614d864c7d6 in poll_poll (self=0x7f9cc3b15270, args=<optimized out>) at ../Modules/selectmodule.c:549
#10 0x00005614d857684a in call_function (oparg=<optimized out>, pp_stack=0x7ffdb1f1fe18) at ../Python/ceval.c:4352
#11 0x00005614d857684a in PyEval_EvalFrameEx (f=Frame 0x5614da939ce0, for file /usr/lib/pymodules/python2.7/notifier/nf_generic.py, line 220, in step (sleep=True, external=True, timeout=100, now=1575480480082, interval=1000, timestamp=1575480480699, callback=<Callback(_args=(<ModuleProcess(_Client__port=6670, _Client__authenticated=False, _Client__socket=None, _connect_retries=63, _Client__unix='/var/run/univention-management-console/14300-1575451497154.socket', _Client__resend_queue={}, _Client__ssl=False, _Provider__signals={'authenticated': <Signal(_Signal__callbacks=[], name='authenticated') at remote 0x7f9be6c0c2d0>, 'finished': <Signal(_Signal__callbacks=[<Callback(_args=('uvmm',), _function=<instancemethod at remote 0x7f9be46f4a50>, _kwargs={}) at remote 0x7f9be54e66c8>], name='finished') at remote 0x7f9be58e9ad0>, 'result': <Signal(_Signal__callbacks=[<instancemethod at remote 0x7f9be46f4780>], name='result') at remote 0x7f9cbcb73450>, 'closed': <Signal(_Signal__callbacks=[<instancemethod at remote 0x7f9be46f4960>, <Callback(_args=('uvmm',), _funct...(truncated), throwflag=0) at ../Python/ceval.c:2989
#12 0x00005614d85749f5 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x7f9cc3b0d728, defcount=2, closure=0x0) at ../Python/ceval.c:3584
#13 0x00005614d857c448 in fast_function (nk=0, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffdb1f20028, func=<function at remote 0x7f9cc3b136e0>) at ../Python/ceval.c:4447
#14 0x00005614d857c448 in call_function (oparg=<optimized out>, pp_stack=0x7ffdb1f20028) at ../Python/ceval.c:4372
#15 0x00005614d857c448 in PyEval_EvalFrameEx (f=Frame 0x7f9cda0fbd90, for file /usr/lib/pymodules/python2.7/notifier/nf_generic.py, line 287, in loop (), throwflag=0) at ../Python/ceval.c:2989
#16 0x00005614d857c14f in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffdb1f20178, func=<function at remote 0x7f9cc3b13758>) at ../Python/ceval.c:4437
#17 0x00005614d857c14f in call_function (oparg=<optimized out>, pp_stack=0x7ffdb1f20178) at ../Python/ceval.c:4372
#18 0x00005614d857c14f in PyEval_EvalFrameEx (f=Frame 0x7f9cdf2b0608, for file /usr/sbin/univention-management-console-server, line 212, in run (self=<UMC_Daemon(stderr_path='/dev/null', app=<...>, parser=<OptionParser(process_default_values=True, allow_interspersed_args=True, _long_opt={'--port': <Option(_long_opts=['--port'], help='defines an alternative port number [default %default]', callback_args=None, callback=None, default=6670, nargs=1, choices=None, dest='port', container=<...>, _short_opts=['-p'], action='store', const=None, callback_kwargs=None, type='int', metavar=None) at remote 0x7f9cdf2a65f0>, '--log-file': <Option(_long_opts=['--log-file'], help='specifies an alternative log file [default: %default]', callback_args=None, callback=None, default='management-console-server', nargs=1, choices=None, dest='logfile', container=<...>, _short_opts=['-L'], action='store', const=None, callback_kwargs=None, type='string', metavar=None) at remote 0x7f9cdf2a6878>, '--debug': <Option(_long_opts=['--debug'], help='if given than debugging is activated and ...(truncated), throwflag=0) at ../Python/ceval.c:2989
#19 0x00005614d857c14f in fast_function (nk=<optimized out>, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffdb1f202c8, func=<function at remote 0x7f9cdf709938>) at ../Python/ceval.c:4437
#20 0x00005614d857c14f in call_function (oparg=<optimized out>, pp_stack=0x7ffdb1f202c8) at ../Python/ceval.c:4372
#21 0x00005614d857c14f in PyEval_EvalFrameEx (f=Frame 0x7f9cdf2abbc0, for file /usr/lib/python2.7/dist-packages/daemon/runner.py, line 186, in _start (self=<UMC_Daemon(stderr_path='/dev/null', app=<...>, parser=<OptionParser(process_default_values=True, allow_interspersed_args=True, _long_opt={'--port': <Option(_long_opts=['--port'], help='defines an alternative port number [default %default]', callback_args=None, callback=None, default=6670, nargs=1, choices=None, dest='port', container=<...>, _short_opts=['-p'], action='store', const=None, callback_kwargs=None, type='int', metavar=None) at remote 0x7f9cdf2a65f0>, '--log-file': <Option(_long_opts=['--log-file'], help='specifies an alternative log file [default: %default]', callback_args=None, callback=None, default='management-console-server', nargs=1, choices=None, dest='logfile', container=<...>, _short_opts=['-L'], action='store', const=None, callback_kwargs=None, type='string', metavar=None) at remote 0x7f9cdf2a6878>, '--debug': <Option(_long_opts=['--debug'], help='if given than debugging is activate...(truncated), throwflag=0) at ../Python/ceval.c:2989
#22 0x00005614d85749f5 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3584
#23 0x00005614d857cb78 in fast_function (nk=0, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffdb1f204d8, func=<function at remote 0x7f9cdfa39500>) at ../Python/ceval.c:4447
#24 0x00005614d857cb78 in call_function (oparg=<optimized out>, pp_stack=0x7ffdb1f204d8) at ../Python/ceval.c:4372
#25 0x00005614d857cb78 in PyEval_EvalFrameEx (f=Frame 0x7f9cdf2ae590, for file /usr/lib/python2.7/dist-packages/daemon/runner.py, line 267, in do_action (self=<UMC_Daemon(stderr_path='/dev/null', app=<...>, parser=<OptionParser(process_default_values=True, allow_interspersed_args=True, _long_opt={'--port': <Option(_long_opts=['--port'], help='defines an alternative port number [default %default]', callback_args=None, callback=None, default=6670, nargs=1, choices=None, dest='port', container=<...>, _short_opts=['-p'], action='store', const=None, callback_kwargs=None, type='int', metavar=None) at remote 0x7f9cdf2a65f0>, '--log-file': <Option(_long_opts=['--log-file'], help='specifies an alternative log file [default: %default]', callback_args=None, callback=None, default='management-console-server', nargs=1, choices=None, dest='logfile', container=<...>, _short_opts=['-L'], action='store', const=None, callback_kwargs=None, type='string', metavar=None) at remote 0x7f9cdf2a6878>, '--debug': <Option(_long_opts=['--debug'], help='if given than debugging is activ...(truncated), throwflag=0) at ../Python/ceval.c:2989
#26 0x00005614d85749f5 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3584
#27 0x00005614d857cb78 in fast_function (nk=0, na=<optimized out>, n=<optimized out>, pp_stack=0x7ffdb1f206e8, func=<function at remote 0x7f9cdfa39758>) at ../Python/ceval.c:4447
#28 0x00005614d857cb78 in call_function (oparg=<optimized out>, pp_stack=0x7ffdb1f206e8) at ../Python/ceval.c:4372
#29 0x00005614d857cb78 in PyEval_EvalFrameEx (f=Frame 0x7f9ce19c6960, for file /usr/sbin/univention-management-console-server, line 245, in <module> (), throwflag=0) at ../Python/ceval.c:2989
#30 0x00005614d85749f5 in PyEval_EvalCodeEx (co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3584
#31 0x00005614d85747b9 in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, locals=<optimized out>) at ../Python/ceval.c:669
#32 0x00005614d85a4bff in run_mod.lto_priv (mod=<optimized out>, filename=<optimized out>, globals={'ucr': <ConfigRegistry(scope=0, _registry={0: <_ConfigRegistry(lock_filename='/etc/univention/base.conf.lock', lock_file=None, backup_file='/etc/univention/base.conf.bak', strict_encoding=False, file='/etc/univention/base.conf') at remote 0x7f9cdf938e30>, 1: <_ConfigRegistry(lock_filename='/etc/univention/base-ldap.conf.lock', lock_file=None, backup_file='/etc/univention/base-ldap.conf.bak', strict_encoding=False, file='/etc/univention/base-ldap.conf') at remote 0x7f9cdf938d08>, 2: <_ConfigRegistry(lock_filename='/etc/univention/base-schedule.conf.lock', lock_file=None, backup_file='/etc/univention/base-schedule.conf.bak', strict_encoding=False, file='/etc/univention/base-schedule.conf') at remote 0x7f9cdf938be0>, 3: <_ConfigRegistry(lock_filename='/etc/univention/base-forced.conf.lock', lock_file=None, backup_file='/etc/univention/base-forced.conf.bak', strict_encoding=False, file='/etc/univention/base-forced.conf') at remote 0x7f9cdf938ab8>, 4: {}}, file=None) at remote 0x7f9cdf70f850>, 'locale': <module a...(truncated), locals={'ucr': <ConfigRegistry(scope=0, _registry={0: <_ConfigRegistry(lock_filename='/etc/univention/base.conf.lock', lock_file=None, backup_file='/etc/univention/base.conf.bak', strict_encoding=False, file='/etc/univention/base.conf') at remote 0x7f9cdf938e30>, 1: <_ConfigRegistry(lock_filename='/etc/univention/base-ldap.conf.lock', lock_file=None, backup_file='/etc/univention/base-ldap.conf.bak', strict_encoding=False, file='/etc/univention/base-ldap.conf') at remote 0x7f9cdf938d08>, 2: <_ConfigRegistry(lock_filename='/etc/univention/base-schedule.conf.lock', lock_file=None, backup_file='/etc/univention/base-schedule.conf.bak', strict_encoding=False, file='/etc/univention/base-schedule.conf') at remote 0x7f9cdf938be0>, 3: <_ConfigRegistry(lock_filename='/etc/univention/base-forced.conf.lock', lock_file=None, backup_file='/etc/univention/base-forced.conf.bak', strict_encoding=False, file='/etc/univention/base-forced.conf') at remote 0x7f9cdf938ab8>, 4: {}}, file=None) at remote 0x7f9cdf70f850>, 'locale': <module a...(truncated), flags=<optimized out>, arena=<optimized out>) at ../Python/pythonrun.c:1376
#33 0x00005614d859fb52 in PyRun_FileExFlags (fp=0x5614d9e60cb0, filename=0x7ffdb1f21eb9 "/usr/sbin/univention-management-console-server", start=257, globals={'ucr': <ConfigRegistry(scope=0, _registry={0: <_ConfigRegistry(lock_filename='/etc/univention/base.conf.lock', lock_file=None, backup_file='/etc/univention/base.conf.bak', strict_encoding=False, file='/etc/univention/base.conf') at remote 0x7f9cdf938e30>, 1: <_ConfigRegistry(lock_filename='/etc/univention/base-ldap.conf.lock', lock_file=None, backup_file='/etc/univention/base-ldap.conf.bak', strict_encoding=False, file='/etc/univention/base-ldap.conf') at remote 0x7f9cdf938d08>, 2: <_ConfigRegistry(lock_filename='/etc/univention/base-schedule.conf.lock', lock_file=None, backup_file='/etc/univention/base-schedule.conf.bak', strict_encoding=False, file='/etc/univention/base-schedule.conf') at remote 0x7f9cdf938be0>, 3: <_ConfigRegistry(lock_filename='/etc/univention/base-forced.conf.lock', lock_file=None, backup_file='/etc/univention/base-forced.conf.bak', strict_encoding=False, file='/etc/univention/base-forced.conf') at remote 0x7f9cdf938ab8>, 4: {}}, file=None) at remote 0x7f9cdf70f850>, 'locale': <module a...(truncated), locals={'ucr': <ConfigRegistry(scope=0, _registry={0: <_ConfigRegistry(lock_filename='/etc/univention/base.conf.lock', lock_file=None, backup_file='/etc/univention/base.conf.bak', strict_encoding=False, file='/etc/univention/base.conf') at remote 0x7f9cdf938e30>, 1: <_ConfigRegistry(lock_filename='/etc/univention/base-ldap.conf.lock', lock_file=None, backup_file='/etc/univention/base-ldap.conf.bak', strict_encoding=False, file='/etc/univention/base-ldap.conf') at remote 0x7f9cdf938d08>, 2: <_ConfigRegistry(lock_filename='/etc/univention/base-schedule.conf.lock', lock_file=None, backup_file='/etc/univention/base-schedule.conf.bak', strict_encoding=False, file='/etc/univention/base-schedule.conf') at remote 0x7f9cdf938be0>, 3: <_ConfigRegistry(lock_filename='/etc/univention/base-forced.conf.lock', lock_file=None, backup_file='/etc/univention/base-forced.conf.bak', strict_encoding=False, file='/etc/univention/base-forced.conf') at remote 0x7f9cdf938ab8>, 4: {}}, file=None) at remote 0x7f9cdf70f850>, 'locale': <module a...(truncated), closeit=1, flags=0x7ffdb1f2096c) at ../Python/pythonrun.c:1362
#34 0x00005614d859f69e in PyRun_SimpleFileExFlags (fp=0x5614d9e60cb0, filename=<optimized out>, closeit=1, flags=0x7ffdb1f2096c) at ../Python/pythonrun.c:948
#35 0x00005614d8550771 in Py_Main (argc=<optimized out>, argv=<optimized out>) at ../Modules/main.c:640
#36 0x00007f9ce0a542e1 in __libc_start_main (main=0x5614d85500a0 <main>, argc=3, argv=0x7ffdb1f20b28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdb1f20b18) at ../csu/libc-start.c:291


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