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

 
 

bug #49992: database package segfaults at dlopen time

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Thu 05 Jan 2017 09:40:33 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Olaf TillOpen/Closed: Closed
Release: otherOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

As you wish, Olaf.

Philip Nienhuis <philipnienhuis>
Project 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>
Project 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>
Project 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>
Project Member

 

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

Attach File(s):
   
   
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
  • -unavailable- added by i7tiol (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 07 Jan 2017 12:59:00 PM UTCphilipnienhuisCategoryNone=>Octave Forge Package
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 05 Jan 2017 09:40:33 PM UTCi7tiolAttached File-=>Added database-backtrace, #39382

    Back to the top


    Powered by Savane 3.1-cleanup1