LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 01-31-2017, 12:42 AM   #31
Wolferz
LQ Newbie
 
Registered: Jan 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled

Thanks Gents

I will have to look at this with more time.

I must use this app ( cgx binary from calculix package ) to build a finite elements model of a Diesel Engine injector assembly, to test for thermal load. In my company ( the one i work for ) we have been running with some problems with the previous model, so i completely redesigned the thing. I will have to use it in Linux, before being able to run it seamlessly in Freebsd.

Strangely though, ccx binary, ( the solver that actually does the number crunching ) runs flawlessly in freebsd...


Thanks anyway
 
Old 01-31-2017, 05:30 AM   #32
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 289

Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by pan64 View Post
but actually if you are right...
That's a 64-bit address which I'm certain is invalid. In decimal, it's 140,070,766,272,208. That's more than 127 terabytes.

Last edited by jggimi; 01-31-2017 at 05:35 AM. Reason: clarity
 
1 members found this post helpful.
Old 01-31-2017, 07:10 AM   #33
Wolferz
LQ Newbie
 
Registered: Jan 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jggimi View Post
That's a 64-bit address which I'm certain is invalid. In decimal, it's 140,070,766,272,208. That's more than 127 terabytes.
Like i said... i only wish i had the time to delve into the code, and find out just how the address pointer gets malformed, googled for getcontext() libc bugs in Freebsd, and found a potentially useful link...

https://groups.google.com/forum/m/#!...le/kMxuEzsPrCM

but as of NOW, i need to have this app ( cgx ) alive and kicking... in need to complete the digital mockup of the injector model so as to make a sensibility analysis od my design parameters, to assess expected reliability under service loads; in short words, get the best "bang for the buck".

As soon as a find a way to get it to work in *BSD, instead of posting from inside a VM, i will be using it natively in my mobo.
 
Old 01-31-2017, 07:52 AM   #34
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 289

Rep: Reputation: 169Reputation: 169
Here's a hint: 3 minutes with the gdb(1) man page, or 10 seconds right here.
Code:
$ gdb /path/to/program /path/to/core/file
gdb() will produce a bunch of heading messages, then give you a (gdb) prompt, where you can ask for a backtrace.
Code:
(gdb) bt
From the backtrace, perhaps even without debugging symbols, you should be able to discern which module was the last to be called before the failure. If not, you can rebuild your program with symbols and try again.

Right now, you do not know the cause of the failure. It could be the application. It could be a supporting library. But until you are able to determine the root cause, all else is a blend of what appears to be to some unsubstantiated wild guesses and magical thinking.

Last edited by jggimi; 01-31-2017 at 07:56 AM. Reason: Added a second paragraph
 
1 members found this post helpful.
Old 01-31-2017, 08:13 AM   #35
Wolferz
LQ Newbie
 
Registered: Jan 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jggimi View Post
Here's a hint: 3 minutes with the gdb(1) man page, or 10 seconds right here.
Code:
$ gdb /path/to/program /path/to/core/file
gdb() will produce a bunch of heading messages, then give you a (gdb) prompt, where you can ask for a backtrace.
Code:
(gdb) bt
From the backtrace, perhaps even without debugging symbols, you should be able to discern which module was the last to be called before the failure. If not, you can rebuild your program with symbols and try again.

Right now, you do not know the cause of the failure. It could be the application. It could be a supporting library. But until you are able to determine the root cause, all else is a blend of what appears to be to some unsubstantiated wild guesses and magical thinking.
last module called was __cxxabiv1::__si_class_type_info in libcxxrt.so

Code:
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000804870268 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
[New Thread 805c18000 (LWP 101269/<unknown>)]
(gdb) bt
#0  0x0000000804870268 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
#1  0x0000000802406975 in ?? () from /usr/local/lib/gcc49/libstdc++.so.6
#2  0x00000008026bc3c0 in ?? () from /usr/local/lib/gcc49/libstdc++.so.6
#3  0x00007fffffffde20 in ?? ()
#4  0x0000000000000000 in ?? ()
(gdb)
in the mean time, i also checked this...

Code:
root@izar:~ # readelf -d /usr/local/bin/cgx | grep NEEDED
 0x0000000000000001 NEEDED               Shared library: [libGL.so.1]
 0x0000000000000001 NEEDED               Shared library: [libGLU.so.1]
 0x0000000000000001 NEEDED               Shared library: [libX11.so.6]
 0x0000000000000001 NEEDED               Shared library: [libXi.so.6]
 0x0000000000000001 NEEDED               Shared library: [libXmu.so.6]
 0x0000000000000001 NEEDED               Shared library: [libXext.so.6]
 0x0000000000000001 NEEDED               Shared library: [libXt.so.6]
 0x0000000000000001 NEEDED               Shared library: [libSM.so.6]
 0x0000000000000001 NEEDED               Shared library: [libICE.so.6]
 0x0000000000000001 NEEDED               Shared library: [libthr.so.3]
 0x0000000000000001 NEEDED               Shared library: [librt.so.1]
 0x0000000000000001 NEEDED               Shared library: [libstdc++.so.6]
 0x0000000000000001 NEEDED               Shared library: [libm.so.5]
 0x0000000000000001 NEEDED               Shared library: [libgcc_s.so.1]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
root@izar:~ #
...so, right now i know that libcxxrt.so calls something in libstdc++.so.6 thac causes the program to segfault.

Thanks 4 your help, i feel i'm making some progress here...
 
Old 01-31-2017, 08:20 AM   #36
Wolferz
LQ Newbie
 
Registered: Jan 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
....talk about a can of worms... :/

https://forums.freebsd.org/threads/56542/

:/ :/
 
Old 01-31-2017, 08:20 AM   #37
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 289

Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by Wolferz View Post
...so, right now i know that libcxxrt.so calls something in libstdc++.so.6 ...
I believe you are misreading the output. The top of the trace is the most recent entry.

You will want to step through the application to discern what *it* is calling, and with what variable values, to cause the segfault. Helpfully, gdb() can step through an application (if built with debugging symbols) by function, by line-of-code, and even by compiled machine instruction. Line-of-code will be the most useful in such an exercise.

Last edited by jggimi; 01-31-2017 at 08:25 AM. Reason: a little clarity
 
1 members found this post helpful.
Old 01-31-2017, 08:28 AM   #38
Wolferz
LQ Newbie
 
Registered: Jan 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jggimi View Post
I believe you are misreading the output. The top of the trace is the most recent entry.

You will want to step through the application to discern what *it* is calling, and with what variable values, to cause the segfault. Helpfully, gdb() can step through an application (if built with debugging symbols) by function, by line-of-code, and even by compiled machine instruction. Line-of-code will be the most useful in such an exercise.
Code:
.....................................................................................
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/local/lib/gcc49/libstdc++.so.6...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libstdc++.so.6]
.......................................................................................
i willl rebuild with debug , later today...
 
Old 01-31-2017, 08:39 AM   #39
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 289

Rep: Reputation: 169Reputation: 169
Disclaimer. I don't use FBSD, as you know. But I find this an interesting message from gdb().
Code:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libstdc++.so.6]
A quick internet search indicates this may cause problems for the gdb() you are using. There may be a port/package of a different version of gdb() for FBSD which can read the symbols from that library.

Or perhaps you can use your favorite tool and rebuild the library with a different version of DWARF symbols.

http://stackoverflow.com/questions/1...-4-should-be-2
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to upgrade an installed binary 'package' to a later version with the source. Knightron Linux - Newbie 2 05-12-2012 07:00 PM
Compiled and installed gpg, how to tar or package it and install on another Liuuxbox? 2007fld Linux - Software 1 11-23-2010 02:30 PM
How to remove a package I compiled and installed? JosephS Slackware 9 12-21-2007 01:49 AM
How much runtime loss using binary over locally compiled package? kaz2100 Debian 4 07-31-2007 11:38 AM
is there a compiled binary package of anjuta 2.0.1 in SLES 9? hongxing SUSE / openSUSE 2 10-13-2005 07:40 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration