Subject: /build/gdb-Ji3G0U/gdb-8.2/gdb/symfile.c:891: internal-error: sect_index_text not initialized

From: Nico Orru <[email-masked]>
Date: Wed, 02 Jan 2019 23:24:05 +0000

Package: gdb
Version: 8.2-1
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

I'm running gdb from within Eclipse. I am writing an openfx plugin (.so) which gets loaded dynamically by the host application (Natron).

It is not straightforward to track this down - suggestions welcome.

The gdb execution fails with the following error:

New UI allocated
GNU gdb (Debian 8.2-1) 8.2
Copyright (C) 2018 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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".
(gdb) [Thread debugging using libthread_db enabled]                                                                                                                                                                                       
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeaf95700 (LWP 10314)]
[New Thread 0x7fffe8dcd700 (LWP 10315)]
[New Thread 0x7fffe2f86700 (LWP 10316)]
/build/gdb-Ji3G0U/gdb-8.2/gdb/symfile.c:891: internal-error: sect_index_text not initialized
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

/build/gdb-Ji3G0U/gdb-8.2/gdb/symfile.c:891: internal-error: sect_index_text not initialized
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y

*** End of the template - remove these template lines ***

-- System Information:
Distributor ID:	Devuan
Description:	Devuan GNU/Linux 1.0.0 (jessie)
Release:	1.0.0
Codename:	jessie
Architecture: x86_64

Kernel: Linux 4.19.0-1-amd64 (SMP w/16 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages gdb depends on:
ii  libbabeltrace1  1.5.6-2
ii  libc6           2.28-3
ii  libexpat1       2.2.6-1
ii  libipt2         2.0-2
ii  liblzma5        5.2.2-1.3
ii  libncursesw6    6.1+20181013-1
ii  libpython3.7    3.7.2~rc1-1
ii  libreadline7    7.0-5
ii  libtinfo6       6.1+20181013-1
ii  zlib1g          1:1.2.11.dfsg-1

Versions of packages gdb recommends:
ii  libc6-dbg [libc-dbg]  2.28-3

Versions of packages gdb suggests:
pn  gdb-doc    <none>
pn  gdbserver  <none>

-- no debconf information

---

From: Nicola Orrù <[email-masked]>
Date: Thu, 3 Jan 2019 01:03:14 +0000

Here's the stack trace at the moment of crash.

Note that:
- program outside of GDB completes with no error
- program loaded in LLDB completes with no error

On Thu, 3 Jan 2019 at 00:03, Devuan bug Tracking System <
[email-masked]> wrote:

> Thank you for the problem report you have sent regarding Devuan.
> This is an automatically generated reply, to let you know your message has
> been received.  It is being forwarded to the developers mailing list for
> their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  [email-masked]
>
> If you wish to submit further information on your problem, please send
> it to [email-masked] (and *not* to
> [email-masked]).
>
> Please do not reply to the address at the top of this message,
> unless you wish to report a problem with the bug-tracking system.
>
> Devuan Bugs Owner
> (administrator, Devuan bugs database)
>

-- 
Cheers,
Nico

---

From: Nicola Orrù <[email-masked]>
Date: Thu, 3 Jan 2019 01:03:26 +0000

#0  __GI__dl_debug_state () at dl-debug.c:74
#1  0x00007ffff7fe8115 in dl_open_worker (a=a@entry=0x7fffffffc8b0) at
dl-open.c:303
#2  0x00007ffff4530fcf in __GI__dl_catch_exception (exception=<optimized
out>, operate=<optimized out>, args=<optimized out>) at
dl-error-skeleton.c:196
#3  0x00007ffff7fe7c0a in _dl_open (file=0x2bada80
"/opt/natron-dist/Natron-2.3.14-Linux-x86_64bit/Plugins/OFX/Natron/IO.ofx.bundle/Contents/Linux-x86-64/IO.ofx",
mode=-2147483647, caller_dlopen=0x11413a4 <OFX::Binary::load()+36>,
nsid=<optimized out>, argc=3, argv=0x7fffffffe568, env=0x1cbea40) at
dl-open.c:599
#4  0x00007ffff7a3f256 in dlopen_doit (a=a@entry=0x7fffffffcad0) at
dlopen.c:66
#5  0x00007ffff4530fcf in __GI__dl_catch_exception
(exception=exception@entry=0x7fffffffca70, operate=<optimized out>,
args=<optimized out>) at dl-error-skeleton.c:196
#6  0x00007ffff453105f in __GI__dl_catch_error (objname=0x1993270,
errstring=0x1993278, mallocedp=0x1993268, operate=<optimized out>,
args=<optimized out>) at dl-error-skeleton.c:215
#7  0x00007ffff7a3f975 in _dlerror_run (operate=operate@entry=0x7ffff7a3f200
<dlopen_doit>, args=args@entry=0x7fffffffcad0) at dlerror.c:163
#8  0x00007ffff7a3f2e6 in __dlopen (file=<optimized out>, mode=<optimized
out>) at dlopen.c:87
#9  0x00000000011413a4 in OFX::Binary::load() ()
#10 0x0000000001141510 in OFX::Binary::ref() ()
#11 0x0000000001128159 in
OFX::Host::PluginHandle::PluginHandle(OFX::Host::Plugin*, OFX::Host::Host*)
()
#12 0x000000000110fe79 in
OFX::Host::ImageEffect::ImageEffectPlugin::getPluginHandle() ()
#13 0x0000000000deb4f9 in
Natron::OfxHost::getPluginContextAndDescribe(OFX::Host::ImageEffect::ImageEffectPlugin*,
Natron::ContextEnum*) ()
#14 0x0000000000b38008 in
Natron::AppInstance::createNodeInternal(Natron::CreateNodeArgs&) ()
#15 0x0000000000b3a329 in
Natron::AppInstance::createNode(Natron::CreateNodeArgs&) ()
#16 0x0000000001089867 in Natron::WriteNodePrivate::createWriteNode(bool,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, boost::shared_ptr<Natron::NodeSerialization>
const&) ()
#17 0x000000000108aff0 in Natron::WriteNode::onEffectCreated(bool,
Natron::CreateNodeArgs const&) ()
#18 0x0000000000dc230d in Natron::Node::load(Natron::CreateNodeArgs const&)
()
#19 0x0000000000b37bdf in
Natron::AppInstance::createNodeInternal(Natron::CreateNodeArgs&) ()
#20 0x0000000000b3a329 in
Natron::AppInstance::createNode(Natron::CreateNodeArgs&) ()
#21 0x0000000000b3aa03 in
Natron::AppInstance::createWriter(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
Natron::CreateNodeArgs&, int, int) ()
#22 0x0000000000e85c1c in Natron::Python::App::createWriter(QString const&,
Natron::Python::Group*, std::map<QString,
Natron::Python::NodeCreationProperty*, std::less<QString>,
std::allocator<std::pair<QString const,
Natron::Python::NodeCreationProperty*> > > const&) const ()
#23 0x00000000010d0384 in ?? ()
#24 0x00007ffff7b5152c in PyEval_EvalFrameEx () from
/opt/natron-dist/Natron-2.3.14-Linux-x86_64bit/bin/../lib/libpython2.7.so.1.0
#25 0x00007ffff7b52d38 in PyEval_EvalCodeEx () from
/opt/natron-dist/Natron-2.3.14-Linux-x86_64bit/bin/../lib/libpython2.7.so.1.0
#26 0x00007ffff7b52f49 in PyEval_EvalCode () from
/opt/natron-dist/Natron-2.3.14-Linux-x86_64bit/bin/../lib/libpython2.7.so.1.0
#27 0x00007ffff7b74df6 in PyRun_StringFlags () from
/opt/natron-dist/Natron-2.3.14-Linux-x86_64bit/bin/../lib/libpython2.7.so.1.0
#28 0x00007ffff7b7761b in PyRun_SimpleStringFlags () from
/opt/natron-dist/Natron-2.3.14-Linux-x86_64bit/bin/../lib/libpython2.7.so.1.0
#29 0x0000000000b3e614 in Natron::AppInstance::loadPythonScript(QFileInfo
const&) ()
#30 0x0000000000b42e6a in Natron::AppInstance::loadInternal(Natron::CLArgs
const&, bool) ()
#31 0x0000000000b30660 in Natron::AppInstance::load(Natron::CLArgs const&,
bool) ()
#32 0x0000000000b5094b in
Natron::AppManager::newAppInstanceInternal(Natron::CLArgs const&, bool,
bool) ()
#33 0x0000000000b50c9f in Natron::AppManager::newAppInstance(Natron::CLArgs
const&, bool) ()
#34 0x0000000000b5c187 in
Natron::AppManager::loadInternalAfterInitGui(Natron::CLArgs const&) ()
#35 0x0000000000b5cbc3 in Natron::AppManager::loadInternal(Natron::CLArgs
const&) ()
#36 0x0000000000b5d514 in Natron::AppManager::loadFromArgs(Natron::CLArgs
const&) ()
#37 0x00000000007b9452 in main ()

-- 
Cheers,
Nico

---

From: Nicola Orrù <[email-masked]>
Date: Thu, 3 Jan 2019 20:00:50 +0000

Steps to reproduce:

wget
https://downloads.natron.fr/Linux/releases/64bit/files/natron_2.3.14_amd64.deb
sudo dpkg -i natron_2.3.14_amd64.deb
echo 'app1.createWriter("target/filtered_test_####.png")' >
break_debugger.py
gdb --args /opt/Natron2/bin/Natron -t break_debugger.py
run

On Thu, 3 Jan 2019 at 01:18, Devuan bug Tracking System <
[email-masked]> wrote:

> Thank you for the additional information you have supplied regarding
> this problem report.  It has been forwarded to the developer(s) and
> to the developers mailing list to accompany the original report.
>
> If you wish to continue to submit further information on your problem,
> please send it to [email-masked], as before.
>

-- 
Cheers,
Nico

---

From: Mark Hindley <[email-masked]>
Date: Mon, 20 Feb 2023 19:16:40 +0000

Control: tags -1 upstream
Control: forwarded -1 https://sourceware.org/bugzilla/show_bug.cgi?id=25678

It seems this is still an unresolved upstream issue.

Mark