Re: Python code error in F39, but not in F38

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun Dec03'23 09:38:20AM, Jeffrey Walton wrote:
> From: Jeffrey Walton <noloader@xxxxxxxxx>
> Date: Sun, 3 Dec 2023 09:38:20 -0500
> To: Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
> CC: Ranjan Maitra <mlmaitra@xxxxxxx>
> Reply-To: noloader@xxxxxxxxx, Community support for Fedora users
>  <users@xxxxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: Python code error in F39, but not in F38
>
> On Wed, Nov 22, 2023 at 5:21 PM Ranjan Maitra via users
> <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Wed Nov22'23 09:49:49PM, Barry Scott wrote:
> > > [...]
> > > > On 22 Nov 2023, at 21:32, Barry Scott <barry@xxxxxxxxxxxxxxxx> wrote:
> > > >
> > > >> Any suggestions as to what is going wrong here?
> > > >
> > > > At this point you need get more information.
> > > >
> > > > What do the folllowing GDB commands print?
> > > >
> > > > p tstate
> > > > p tstate->interp
> > > > thread allow all bt
> > > Doh...
> > >
> > >       thread apply all bt
> > >
> > > I always type:
> > >       t a a bt
> > >
> > > and typo'ed the expansion.
> >
> > Thanks, here is what comes out:
> >
> >  (gdb)  p tstate->interp
> >
> >  value has been optimized out
> >  (gdb) thread apply all bt
> >
> >  Thread 1 (Thread 0x7ffff7ec7740 (LWP 387946) "python"):
> >  #0  0x00007ffff79e4b5b in _PyInterpreterState_GET () at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Include/internal/pycore_pystate.h:118
> >  #1  get_state () at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:866
> >  #2  _PyObject_Free (ctx=<optimized out>, p=0x555556d898a0) at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:1850
> >  #3  0x00007fff9e5e292f in sip_api_free (mem=<optimized out>) at /usr/src/debug/sip-4.19.25-9.fc39.x86_64/siplib/siplib.c:2239
> >  #4  sipOMFinalise (om=0x7fff9e5ff9a0 <cppPyMap.lto_priv.0>) at /usr/src/debug/sip-4.19.25-9.fc39.x86_64/susr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Python/pylifecycle.c:1977
>
> sip-4.19 is from 2018. The Python folks will probably tell you to
> update to something newer, like sip-6.7. Also see
> <https://pypi.org/project/sip/#history>.

Thank you for this! I have no idea where sip gets pulled from, because
it was not installed in the system.

So I went ahead and installed sip6 via:

sudo dnf install sip6
 # brings in sip-6.7.12.

I get:

(gdb) run ./test.py statlab.tiff statlab-8-rgb.png 1 5
 Starting program: /usr/bin/python ./test.py statlab.tiff statlab-8-rgb.png 1 5
 Downloading separate debug info for system-supplied DSO at 0x7ffff7fc7000
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib64/libthread_db.so.1".
 [New Thread 0x7fff9c39b6c0 (LWP 6832)]                            <2-t_��>ý v:lua.cmp.utils.feedkeys.call.run(12)
,
 [New Thread 0x7fff9bb9a6c0 (LWP 6833)]
 [New Thread 0x7fff9b3996c0 (LWP 6834)]
 [New Thread 0x7fff91d856c0 (LWP 6835)]
 [New Thread 0x7fff915846c0 (LWP 6836)]
 [New Thread 0x7fff90d836c0 (LWP 6837)]
 [New Thread 0x7fff905826c0 (LWP 6838)]
 0.5003370299685227

 Thread 1 "python" received signal SIGSEGV, Segmentation fault.
 0x00007ffff79e4b5b in _PyInterpreterState_GET ()
     at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Include/internal/pycore_pystate.h:118
 118         return tstate->interp;

(gdb) p tstate
 $1 = <optimized out>

(gdb) p tstate->interp
 value has been optimized out

I get:

(gdb) thread apply all bt

 Thread 8 (Thread 0x7fff905826c0 (LWP 6838) "python"):
 #0  futex_wait (val=128, addr=0x555555d99b84) at ../../../libgomp/config/linux/x86/futex.h:97
 #1  do_wait (val=128, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
 #2  gomp_barrier_wait_end (bar=0x555555d99b80, state=128) at ../../../libgomp/config/linux/bar.c:48
 #3  0x00007fffe95cdd28 in gomp_simple_barrier_wait (bar=0x555555d99b80) at ../../../libgomp/config/posix/simple-bar.h:60
 #4  gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:133
 #5  0x00007ffff76ac897 in start_thread (arg=<optimized out>) at pthread_create.c:444
 #6  0x00007ffff77336bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

 Thread 7 (Thread 0x7fff90d836c0 (LWP 6837) "python"):
 #0  futex_wait (val=128, addr=0x555555d99b84) at ../../../libgomp/config/linux/x86/futex.h:97
 #1  do_wait (val=128, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
 #2  gomp_barrier_wait_end (bar=0x555555d99b80, state=128) at ../../../libgomp/config/linux/bar.c:48
 #3  0x00007fffe95cdd28 in gomp_simple_barrier_wait (bar=0x555555d99b80) at ../../../libgomp/config/posix/simple-bar.h:60
 #4  gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:133
 #5  0x00007ffff76ac897 in start_thread (arg=<optimized out>) at pthread_create.c:444
 #6  0x00007ffff77336bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

 Thread 6 (Thread 0x7fff915846c0 (LWP 6836) "python"):
 #0  futex_wait (val=128, addr=0x555555d99b84) at ../../../libgomp/config/linux/x86/futex.h:97
 #1  do_wait (val=128, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
 #2  gomp_barrier_wait_end (bar=0x555555d99b80, state=128) at ../../../libgomp/config/linux/bar.c:48
 #3  0x00007fffe95cdd28 in gomp_simple_barrier_wait (bar=0x555555d99b80) at ../../../libgomp/config/posix/simple-bar.h:60
 #4  gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:133
 #5  0x00007ffff76ac897 in start_thread (arg=<optimized out>) at pthread_create.c:444
 #6  0x00007ffff77336bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

 Thread 5 (Thread 0x7fff91d856c0 (LWP 6835) "python"):
 #0  futex_wait (val=128, addr=0x555555d99b84) at ../../../libgomp/config/linux/x86/futex.h:97
 #1  do_wait (val=128, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
 #2  gomp_barrier_wait_end (bar=0x555555d99b80, state=128) at ../../../libgomp/config/linux/bar.c:48
 #3  0x00007fffe95cdd28 in gomp_simple_barrier_wait (bar=0x555555d99b80) at ../../../libgomp/config/posix/simple-bar.h:60
 #4  gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:133
 #5  0x00007ffff76ac897 in start_thread (arg=<optimized out>) at pthread_create.c:444
 #6  0x00007ffff77336bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

 Thread 4 (Thread 0x7fff9b3996c0 (LWP 6834) "python"):
 #0  futex_wait (val=128, addr=0x555555d99b84) at ../../../libgomp/config/linux/x86/futex.h:97
 #1  do_wait (val=128, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
 #2  gomp_barrier_wait_end (bar=0x555555d99b80, state=128) at ../../../libgomp/config/linux/bar.c:48
 #3  0x00007fffe95cdd28 in gomp_simple_barrier_wait (bar=0x555555d99b80) at ../../../libgomp/config/posix/simple-bar.h:60
 #4  gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:133
 #5  0x00007ffff76ac897 in start_thread (arg=<optimized out>) at pthread_create.c:444
 #6  0x00007ffff77336bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

 Thread 3 (Thread 0x7fff9bb9a6c0 (LWP 6833) "python"):
 #0  futex_wait (val=128, addr=0x555555d99b84) at ../../../libgomp/config/linux/x86/futex.h:97
 #1  do_wait (val=128, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
 #2  gomp_barrier_wait_end (bar=0x555555d99b80, state=128) at ../../../libgomp/config/linux/bar.c:48
 #3  0x00007fffe95cdd28 in gomp_simple_barrier_wait (bar=0x555555d99b80) at ../../../libgomp/config/posix/simple-bar.h:60
 #4  gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:133
 #5  0x00007ffff76ac897 in start_thread (arg=<optimized out>) at pthread_create.c:444
 #6  0x00007ffff77336bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

 Thread 2 (Thread 0x7fff9c39b6c0 (LWP 6832) "python"):
 #0  futex_wait (val=128, addr=0x555555d99b84) at ../../../libgomp/config/linux/x86/futex.h:97
 #1  do_wait (val=128, addr=<optimized out>) at ../../../libgomp/config/linux/wait.h:67
 #2  gomp_barrier_wait_end (bar=0x555555d99b80, state=128) at ../../../libgomp/config/linux/bar.c:48
 #3  0x00007fffe95cdd28 in gomp_simple_barrier_wait (bar=0x555555d99b80) at ../../../libgomp/config/posix/simple-bar.h:60
 #4  gomp_thread_start (xdata=<optimized out>) at ../../../libgomp/team.c:133
 #5  0x00007ffff76ac897 in start_thread (arg=<optimized out>) at pthread_create.c:444
 #6  0x00007ffff77336bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

 Thread 1 (Thread 0x7ffff7ec7740 (LWP 6828) "python"):
 #0  0x00007ffff79e4b5b in _PyInterpreterState_GET () at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Include/internal/pycore_pystate.h:118
 #1  get_state () at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:866
 #2  _PyObject_Free (ctx=<optimized out>, p=0x555556d85180) at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Objects/obmalloc.c:1850
 #3  0x00007fff9e5e292f in sip_api_free (mem=<optimized out>) at /usr/src/debug/sip-4.19.25-9.fc39.x86_64/siplib/siplib.c:2239
 #4  sipOMFinalise (om=0x7fff9e5ff9a0 <cppPyMap.lto_priv.0>) at /usr/src/debug/sip-4.19.25-9.fc39.x86_64/siplib/objmap.c:69
 #5  finalise() () at /usr/src/debug/sip-4.19.25-9.fc39.x86_64/siplib/siplib.c:2143
 #6  0x00007ffff79404d4 in call_ll_exitfuncs (runtime=0x7ffff7ddaa60 <_PyRuntime>) at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Python/pylifecycle.c:3018
 #7  Py_FinalizeEx () at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Python/pylifecycle.c:1977
 #8  0x00007ffff7ab6337 in Py_RunMain () at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Modules/main.c:691
 #9  0x00007ffff7a7185c in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/python3.12-3.12.0-1.fc39.x86_64/Modules/main.c:743
 #10 0x00007ffff764614a in __libc_start_call_main (main=main@entry=0x555555555160 <main>, argc=argc@entry=6, argv=argv@entry=0x7fffffffe0d8) at ../sysdeps/nptl/libc_start_call_main.h:58
 #11 0x00007ffff764620b in __libc_start_main_impl (main=0x555555555160 <main>, argc=6, argv=0x7fffffffe0d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe0c8) at ../csu/libc-start.c:360
 #12 0x0000555555555095 in _start ()
(gdb)

Interestingly, it still refers to sip-4.19, however:

$ sudo dnf list sip\*
 Last metadata expiration check: 2:48:01 ago on Sun 03 Dec 2023 08:21:56 AM CST.
 Installed Packages
 sip6.x86_64                           6.7.12-1.fc39                     @updates
 Available Packages
 sip.x86_64                            4.19.25-9.fc39                    fedora
 sip-doc.noarch                        4.19.25-9.fc39                    fedora
 sip-redirect.noarch                   0.2.0-20.fc39                     fedora
 sipcalc.x86_64                        1.1.6-24.fc39                     fedora
 sipp.x86_64                           3.7.2-2.fc39                      updates
 sipsak.x86_64                         0.9.8.1-8.fc39                    fedora
 sipvicious.noarch                     0.3.3-9.fc39                      fedora


Any suggestions? I still get the segfault.

Best wishes,
Ranjan
--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux