Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-12

Inconsistency detected by ld.so

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Seth Grover

Using the examples from the test suite for an .so and a host program (http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/webtbs/tw12704a.pp?view=markup and http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/webtbs/tw12704b.pp?view=markup), when I run the host program I get:

$ ./tw12704b
Inconsistency detected by ld.so: dl-fini.c: 195: _dl_fini: Assertion `ns != 0 || i == nloaded' failed!

It seems this is a fairly recent development, but I'm at a loss as to what causes it.

My setup is just a generic Ubuntu 9.10 32-bit installation (uname -a reports: Linux tlacuache-laptop 2.6.31-15-generic #50-Ubuntu SMP Tue Nov 10 14:54:29 UTC 2009 i686 GNU/Linux).

FPC 2.4.0 from http://svn.freepascal.org/svn/fpc/tags/release_2_4_0 (revision 14294).

Any ideas? Should I file a bug report?

-SG

This email is fiction. Any resemblance to actual events or persons living or dead is purely coincidental. Seth Grover sethdgrover[at]gmail[dot]com
Seth Grover
to Seth Grover

Interestingly:

$ ldd tw12704b
linux-gate.so.1 => (0x00c69000)
libtw12704a.so => ./libtw12704a.so (0x00701000)

However, if I add a unit that uses glibc (like the systemlog unit) I get:

$ ldd tw12704b
linux-gate.so.1 => (0x00df6000)
libtw12704a.so => ./libtw12704a.so (0x0080a000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00c27000) /lib/ld-linux.so.2 (0x002c7000)

And I don't get the error when the program runs.

-SG

This email is fiction. Any resemblance to actual events or persons living or dead is purely coincidental. Seth Grover sethdgrover[at]gmail[dot]com
Jonas Maebe
to Seth Grover: Using the examples from the test suite for an .so and a host program…
Seth Grover wrote 12 lines
Using the examples from the test suite for an .so and a host program (http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/webtbs/tw12704a.pp?view=markup and http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/webtbs/tw12704b.pp?view=markup) , when I run the host program I get: $ ./tw12704b Inconsistency detected by ld.so: dl-fini.c: 195: _dl_fini: Assertion `ns != 0 || i == nloaded' failed! It seems this is a fairly recent development, but I'm at a loss as to what causes it.

Well, not that recent: http://www.hu.freepascal.org/lists/fpc-pascal/2008-April/017199.html

It seemed to be specific to a particular machine of yours.

Jonas

Seth Grover

Wow, how embarrassing. Not only is there already a mailing list thread on the topic, but it was started by me. I have a really bad memory.

It seemed to be specific to a particular machine of yours.

At the moment, however, I am duplicating this on a number of different ubuntu installations, (admittedly, all Ubuntu 9.10 installations) and so is my coworker on his machine.

In fact, last night I set up a brand new fresh virtual machine into which I installed Ubuntu 9.10 and the bare minimum of packages to grab FPC from svn and compile it, and I was able to reproduce it.

Does anyone else see this?

-SG

Seth Grover
to Seth Grover

So I've been testing the problem with the "Inconsistency detected by ld.so: dl-fini.c: 195: _dl_fini: Assertion
`ns != 0 || i == nloaded' failed!" error with tests tw12704a and tw12704b on various different platforms.

So far it's reproduced on every 32-bit Ubuntu installation I've tried (about half a dozen 9.04 and 9.10 installations I have around) and it also failed on a custom RedHat-based distribution we use internally in our company.

However, it does not reproduce on my CentOS 5.3 installation, nor does it reproduce on my 64-bit Ubuntu 9.10 installation.

Is there someone with more knowledge of how linking and ld.so works in Linux that has any ideas? I really don't think it's just something I'm doing wrong, because I can reproduce it on several different platforms, including stock virtual machines I haven't had a chance to mess up yet. :) Even if any of you are FPC users running Ubuntu could you give this a try and see if you can reproduce it?

-SG

This email is fiction. Any resemblance to actual events or persons living or dead is purely coincidental. Seth Grover sethdgrover[at]gmail[dot]com