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

AttributeError: 'module' object has no attribute 'new_thread' #66

Closed
sn0ot opened this issue Mar 2, 2021 · 2 comments
Closed

AttributeError: 'module' object has no attribute 'new_thread' #66

sn0ot opened this issue Mar 2, 2021 · 2 comments
Assignees
Labels

Comments

@sn0ot
Copy link

sn0ot commented Mar 2, 2021

Running GDB in a chroot and recieving the following error regarding events in Python

(gdb) source sync.py
[sync] configuration file loaded from: /root/.sync
       interface: 192.168.1.56:9234
[sync] init
Traceback (most recent call last):
  File "sync.py", line 1070, in <module>
    SYNC_PLUGIN = Sync(rs_cfg, rs_commands)
  File "sync.py", line 390, in __init__
    gdb.events.new_thread.connect(self.newthread_handler)
AttributeError: 'module' object has no attribute 'new_thread'

ret-sync's sync.py DOES work if not running in a chroot.

(gdb) source sync.py
[sync] configuration file loaded from: /root/.sync
       interface: 192.168.1.56:9234
[sync] init
[sync] 18 commands added

I suspect this issue stems from GDB but sync.py fails too early for me to debug what is actually happening. Any ideas?

@bootleg
Copy link
Owner

bootleg commented Mar 5, 2021

Hi @sn0ot

this is a hard one. Just incase make sure that the gdb package inside the chroot is gdb full not the gdb-minimal package. However it may have crashed sooner.

Which version of gdb are you running ? I found a similar error message in this mailing list: https://sourceware.org/pipermail/gdb-prs/2017q3.txt

bootleg added a commit that referenced this issue Mar 23, 2021
…w_thread event

As reported in #66 , new_thread event may not be available for some packages of GDB. Remove dependency on it. Use a check on threading.main_thread().is_alive() instead to detect the termination of the interpreter.

Thanks @sn0ot and @agantet for reporting the issue.
@bootleg bootleg added the bug label Mar 29, 2021
@bootleg bootleg self-assigned this Mar 29, 2021
@bootleg
Copy link
Owner

bootleg commented Mar 29, 2021

Hopefully this issue is fixed by default thanks to the commit above (98698a5)

Please re-open if necessary. Thank you for reporting the issue.

@bootleg bootleg closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants