[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-list
Subject:    Re: Python code error in F39, but not in F38
From:       Neal Becker <ndbecker2 () gmail ! com>
Date:       2023-11-19 21:12:36
Message-ID: CAG3t+pHw5+HRGDM5O35cnVBH-4xbZ_0rCkyeTpMLiNRHP9fYnw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Start gdb python.  Set a breakpoint in the shared module.  continue.

On Sun, Nov 19, 2023 at 1:02 PM Ranjan Maitra via users <
users@lists.fedoraproject.org> wrote:

> On Sun Nov19'23 05:35:19PM, Barry wrote:
> > From: Barry <barry@barrys-emacs.org>
> > Date: Sun, 19 Nov 2023 17:35:19 +0000
> > To: Community support for Fedora users <users@lists.fedoraproject.org>
>  >
> > >
> > >
> > > It is possible that there is a bug in the code itself, but nothing
> above
> > > points to my created code.
> > >
> > > Any suggestions? Or is this a bug?
> >
> > Are you using C extensions in your code? If so I would suspect them for
> corrupting python. I think you can get into gdb inside the core file with
> coredumpctl debug.
>
> The python code calls a shared object library that is written in C. But
> why does this core dump only happen in F39 (python 3.12) and not with
> F38 (python 3.11)?
>
> > What does "info shared" tell you about what code has been loaded into
> memory?
>
> This would be under gdb, I presume.
>
>
> > It is also worth trying to find the type of the object that is being
> deleted, _PyObject_Free will have pointer to the object.
> > Also not sure where siplib.c is from is it python or an extension?
>
> Thanks, I don't know either, but there is no siplib.c anywhere on either
> of my two systems.
>
> > I am assuming here that you are familiar with debugging with gdb.
>
> Thanks, I am familiar with using gdb for a C program, never used it with
> python code calling a C shared object.
>
> I tried:
>
> $ gdb python "./test.py ultadanga.tiff ultadanga-64-rgb.png 1 7"
> GNU gdb (Fedora Linux) 13.2-10.fc39
> Copyright (C) 2023 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <https://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
>     <http://www.gnu.org/software/gdb/documentation/>.
>
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from python...
>
> This GDB supports auto-downloading debuginfo from the following URLs:
>   <https://debuginfod.fedoraproject.org/>
> Enable debuginfod for this session? (y or [n]) y
> Debuginfod has been enabled.
> To make this setting permanent, add 'set debuginfod enabled on' to
> .gdbinit.
> Reading symbols from
> /home/localuser/.cache/debuginfod_client/07023eb4f297ae1d4591e--Type <RET>
> for more, q to quit, c to continue without paging--
> c808ab20b2788c542be/debuginfo...
> ./test.py ultadanga.tiff ultadanga-64-rgb.png 1 7: No such file or
> directory.
> (gdb)
>
>
> Not quite sure how to proceed here.
>
> Many thanks again, and best wishes,
> Ranjan
>
> --
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-leave@lists.fedoraproject.org
> 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@lists.fedoraproject.org
> Do not reply to spam, report it:
> https://pagure.io/fedora-infrastructure/new_issue
>


-- 
*Those who don't understand recursion are doomed to repeat it*

[Attachment #5 (text/html)]

<div dir="ltr">Start gdb python.   Set a breakpoint in the shared module.   \
continue.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, \
Nov 19, 2023 at 1:02 PM Ranjan Maitra via users &lt;<a \
href="mailto:users@lists.fedoraproject.org">users@lists.fedoraproject.org</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun Nov19&#39;23 \
05:35:19PM, Barry wrote:<br> &gt; From: Barry &lt;<a \
href="mailto:barry@barrys-emacs.org" \
target="_blank">barry@barrys-emacs.org</a>&gt;<br> &gt; Date: Sun, 19 Nov 2023 \
17:35:19 +0000<br> &gt; To: Community support for Fedora users &lt;<a \
href="mailto:users@lists.fedoraproject.org" \
target="_blank">users@lists.fedoraproject.org</a>&gt;<br>  &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; It is possible that there is a bug in the code itself, but nothing \
above<br> &gt; &gt; points to my created code.<br>
&gt; &gt;<br>
&gt; &gt; Any suggestions? Or is this a bug?<br>
&gt;<br>
&gt; Are you using C extensions in your code? If so I would suspect them for \
corrupting python. I think you can get into gdb inside the core file with coredumpctl \
debug.<br> <br>
The python code calls a shared object library that is written in C. But<br>
why does this core dump only happen in F39 (python 3.12) and not with<br>
F38 (python 3.11)?<br>
<br>
&gt; What does "info shared" tell you about what code has been loaded into \
memory?<br> <br>
This would be under gdb, I presume.<br>
<br>
<br>
&gt; It is also worth trying to find the type of the object that is being deleted, \
_PyObject_Free will have pointer to the object.<br> &gt; Also not sure where siplib.c \
is from is it python or an extension?<br> <br>
Thanks, I don&#39;t know either, but there is no siplib.c anywhere on either<br>
of my two systems.<br>
<br>
&gt; I am assuming here that you are familiar with debugging with gdb.<br>
<br>
Thanks, I am familiar with using gdb for a C program, never used it with<br>
python code calling a C shared object.<br>
<br>
I tried:<br>
<br>
$ gdb python &quot;./test.py ultadanga.tiff ultadanga-64-rgb.png 1 7&quot;<br>
GNU gdb (Fedora Linux) 13.2-10.fc39<br>
Copyright (C) 2023 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later &lt;<a \
href="http://gnu.org/licenses/gpl.html" rel="noreferrer" \
target="_blank">http://gnu.org/licenses/gpl.html</a>&gt;<br> This is free software: \
you are free to change and redistribute it.<br> There is NO WARRANTY, to the extent \
permitted by law.<br> Type &quot;show copying&quot; and &quot;show warranty&quot; for \
details.<br> This GDB was configured as &quot;x86_64-redhat-linux-gnu&quot;.<br>
Type &quot;show configuration&quot; for configuration details.<br>
For bug reporting instructions, please see:<br>
&lt;<a href="https://www.gnu.org/software/gdb/bugs/" rel="noreferrer" \
target="_blank">https://www.gnu.org/software/gdb/bugs/</a>&gt;.<br> Find the GDB \
                manual and other documentation resources online at:<br>
      &lt;<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" \
target="_blank">http://www.gnu.org/software/gdb/documentation/</a>&gt;.<br> <br>
For help, type &quot;help&quot;.<br>
Type &quot;apropos word&quot; to search for commands related to \
&quot;word&quot;...<br> Reading symbols from python...<br>
<br>
This GDB supports auto-downloading debuginfo from the following URLs:<br>
   &lt;<a href="https://debuginfod.fedoraproject.org/" rel="noreferrer" \
target="_blank">https://debuginfod.fedoraproject.org/</a>&gt;<br> Enable debuginfod \
for this session? (y or [n]) y<br> Debuginfod has been enabled.<br>
To make this setting permanent, add &#39;set debuginfod enabled on&#39; to \
.gdbinit.<br> Reading symbols from \
/home/localuser/.cache/debuginfod_client/07023eb4f297ae1d4591e--Type &lt;RET&gt; for \
more, q to quit, c to continue without paging--<br> \
                c808ab20b2788c542be/debuginfo...<br>
./test.py ultadanga.tiff ultadanga-64-rgb.png 1 7: No such file or directory.<br>
(gdb)<br>
<br>
<br>
Not quite sure how to proceed here.<br>
<br>
Many thanks again, and best wishes,<br>
Ranjan<br>
<br>
--<br>
_______________________________________________<br>
users mailing list -- <a href="mailto:users@lists.fedoraproject.org" \
target="_blank">users@lists.fedoraproject.org</a><br> To unsubscribe send an email to \
<a href="mailto:users-leave@lists.fedoraproject.org" \
target="_blank">users-leave@lists.fedoraproject.org</a><br> Fedora Code of Conduct: \
<a href="https://docs.fedoraproject.org/en-US/project/code-of-conduct/" \
rel="noreferrer" target="_blank">https://docs.fedoraproject.org/en-US/project/code-of-conduct/</a><br>
 List Guidelines: <a href="https://fedoraproject.org/wiki/Mailing_list_guidelines" \
rel="noreferrer" target="_blank">https://fedoraproject.org/wiki/Mailing_list_guidelines</a><br>
 List Archives: <a href="https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org" \
rel="noreferrer" target="_blank">https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org</a><br>
 Do not reply to spam, report it: <a \
href="https://pagure.io/fedora-infrastructure/new_issue" rel="noreferrer" \
target="_blank">https://pagure.io/fedora-infrastructure/new_issue</a><br> \
</blockquote></div><br clear="all"><div><br></div><span \
class="gmail_signature_prefix">-- </span><br><div dir="ltr" \
class="gmail_signature"><div dir="ltr"><i>Those who don&#39;t understand recursion \
are doomed to repeat it</i></div></div>


[Attachment #6 (text/plain)]

--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic