bugGNU Octave - Bugs: bug #49992, database package segfaults at...

 
 

bug #49992: database package segfaults at dlopen time

Submitter:  Olaf Till <i7tiol>
Submitted:  Thu 05 Jan 2017 09:40:33 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Olaf Till Open/Closed:  * Closed
Release:  * other Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 07 Jan 2017 12:59:00 PM UTC, comment #3: 

As you wish, Olaf.

Philip Nienhuis <philipnienhuis>
Group Member
Sat 07 Jan 2017 10:03:30 AM UTC, comment #2: 

Fixed. This bug should be placed in category 'OF package' and closed.

Olaf Till <i7tiol>
Group Member
Fri 06 Jan 2017 02:36:20 PM UTC, comment #1: 

The reason was simply an erroneous linking against a different liboctave and liboctinterp, whose globals were initialized at dlopen time, leading to the crash ... will come back after fixing it and looking at the other bug (49987).

Olaf Till <i7tiol>
Group Member
Thu 05 Jan 2017 09:40:33 PM UTC, original submission:  

Put out of #49987 as a possibly separate bug.

Not sure if the reason is in database package or Octave.

Similar with Octave-4.3.0+ (2017-01-03, 53bb781d70c0) and Octave-4.0.0.

If the common oct-file of 'database', pq_interface.oct, is loaded into Octave (due to a 'which _pq_connect_' command), Octave segfaults. In Octave-4.3.0+, the backtrace is at least several thousand frames long, seemingly due to recursion. In Octave-4.0.0, the backtrace is readable (attached). It shows some stuff seemingly related to dlopen, opening the correct file .../pq_interface.oct, and immediately afterwards routines of core Octave, in graphics.cc/h, not of 'database'. So I thought the backtrace was corrupted and tried something different: I introduced dummy global variable initializations, with test outputs to stdout, to the beginning and end of each compilation unit (cc-file). Compiled with optimization switched off (-O0). I got the segfault again, but no test outputs at all! (Yes, page_screen_output was 'false', and there were the usual outputs with 'panic ...'.) So it seems that there were no initializations of globals done at all. But the only package code run at dlopen time should be for initialization of globals, or am I wrong? What then can have caused the segfault? Something in core Octave? But other packages worked ... Has anyone a clue?

Olaf Till <i7tiol>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #39382:  database-backtrace added by i7tiol (15KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-07 philipnienhuis CategoryNone Octave Package
        StatusNone Fixed
        Open/ClosedOpen Closed
    2017-01-05 i7tiol Attached File- Added database-backtrace, #39382

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code