Skip to content

Need portable code without magic #239

Description

@ilyakurdyukov

I tried running it on the e2k architecture (aka Elbrus 2000), and python3 -c "import cysignals" exited with a SIGKILL (-9).

This is what it looks like in GDB:

Starting program: /usr/bin/python3 -c import\ cysignals
[New LWP 3505303]
[LWP 3505303 exited]

Program terminated with signal SIGKILL, Killed.
The program no longer exists.

Also using break pthread_exit, just before the program terminates:

Starting program: /usr/bin/python3 -c import\ cysignals
[New LWP 3683864]
[Switching to LWP 3683864]

Thread 2 "python3" hit Breakpoint 1, 0x00004555559c9820 in __pthread_exit (value=<optimized out>)
    at pthread_exit.c:26
26    {
(gdb) bt 10
#0  0x00004555559c9820 in __pthread_exit (value=<optimized out>) at pthread_exit.c:26
#1  0x00004555560ccb10 in _sig_on_trampoline ()
   from /usr/lib64/python3/site-packages/cysignals/signals.cpython-312.so
#2  0x00004555559c6bc8 in start_thread (arg=<optimized out>) at pthread_create.c:358
#3  0x0000455555c23d60 in __thread_start () from /lib64/libc.so.6
#4  0x0000000000000000 in ?? () 

I think thread is terminated when it tries to use longjmp on setjmp from the other thread, this is not allowed, thread must be the same. Is it possible to port cysignals to ucontext?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions