Bug 1377484 - openbabel segmentation fault
Summary: openbabel segmentation fault
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: openbabel
Version: 27
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Dominik 'Rathann' Mierzejewski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-19 20:49 UTC by Dmitry
Modified: 2018-12-02 23:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 17:46:54 UTC
Type: Bug


Attachments (Terms of Use)
NWChem output file (16.80 KB, text/plain)
2017-04-01 11:16 UTC, Dmitry
no flags Details
NWChem output file (1.55 MB, text/plain)
2017-04-01 11:22 UTC, Dmitry
no flags Details

Description Dmitry 2016-09-19 20:49:57 UTC
Description of problem:
Openbabel cannot convert coordinates

Version-Release number of selected component (if applicable):
2.3.90-0.9.20160216git3a63a98.fc24

How reproducible:
always

Steps to Reproduce:
1. Try to convert nwchem output file .out to xyz: babel -inwo nwfile.out -oxyz

Actual results:
SegFault
*** Error in `babel': free(): invalid pointer: 0x00007fb50cc50050 ***
======= Backtrace: =========
/usr/lib64/libc.so.6(+0x7566b)[0x7fb52355a66b]
/usr/lib64/libc.so.6(+0x7de0a)[0x7fb523562e0a]
/usr/lib64/libc.so.6(cfree+0x4c)[0x7fb52356636c]
/usr/lib64/openbabel/nwchemformat.so(_ZN9OpenBabel18NWChemOutputFormat15ReadCoordinatesEPSiPNS_5OBMolE+0x21b)[0x7fb50ca47dfb]
/usr/lib64/openbabel/nwchemformat.so(_ZN9OpenBabel18NWChemOutputFormat12ReadMoleculeEPNS_6OBBaseEPNS_12OBConversionE+0x1f0)[0x7fb50ca49890]
/usr/lib64/libopenbabel.so.4(_ZN9OpenBabel16OBMoleculeFormat18ReadChemObjectImplEPNS_12OBConversionEPNS_8OBFormatE+0xd77)[0x7fb523225187]
/usr/lib64/libopenbabel.so.4(_ZN9OpenBabel12OBConversion7ConvertEv+0x205)[0x7fb5231c8125]
/usr/lib64/libopenbabel.so.4(_ZN9OpenBabel12OBConversion7ConvertEPSiPSo+0xb9)[0x7fb5231ce039]
/usr/lib64/libopenbabel.so.4(_ZN9OpenBabel12OBConversion11FullConvertERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERS7_SA_+0x1edd)[0x7fb5231d003d]
babel(main+0xb9e)[0x561c57211dbe]
/usr/lib64/libc.so.6(__libc_start_main+0xf1)[0x7fb523505731]
babel(_start+0x29)[0x561c57212489]


Expected results:
XYZ-matrix

Additional info:
I compiled code from source and GDB says:
#11 0x00007ffff7701671 in OpenBabel::OBConversion::FullConvert (this=this@entry=0x7fffffffd9c0, FileList=std::vector of length 1, capacity 1 = {...}, OutputFileName="", 
    OutputFileList=std::vector of length 0, capacity 0) at /home/madchem/openbabel-2.3.2/openbabel/src/obconversion.cpp:1486
1486	        Count = Convert(pIs,pOs);
(gdb) disp pOs
1: pOs = (std::ostream *) 0x0
(gdb) list
1481	                  }
1482	              }
1483	          }
1484	
1485	        //Single input and output files
1486	        Count = Convert(pIs,pOs);
1487	
1488	        if(os && !os.is_open() && !OutputFileName.empty())
1489	          {
1490	            //Output was written to temporary string stream. Output it to the file

Comment 1 stanislav.simko 2017-03-31 13:08:35 UTC
I confirm that this bug is still present as of now, fc25, kernel 4.9.14, babel version 2.3.90.
I also tested on Debian (in virtualbox), babel version 2.3.2 and it's working OK.

Comment 2 Susi Lehtola 2017-03-31 16:28:03 UTC
(In reply to Dmitry from comment #0)
> I compiled code from source and GDB says:
> #11 0x00007ffff7701671 in OpenBabel::OBConversion::FullConvert
> (this=this@entry=0x7fffffffd9c0, FileList=std::vector of length 1, capacity
> 1 = {...}, OutputFileName="", 
>     OutputFileList=std::vector of length 0, capacity 0) at
> /home/madchem/openbabel-2.3.2/openbabel/src/obconversion.cpp:1486
> 1486	        Count = Convert(pIs,pOs);

Note that this is totally unnecessary. You just need to
 # debuginfo-install openbabel-debuginfo
after which you can run all debugging tools without problems.

You didn't include the problematic output file in the report. Please try out the scratch build of the newer release at
https://koji.fedoraproject.org/koji/taskinfo?taskID=18698475

Comment 3 Dmitry 2017-04-01 11:11:52 UTC
(In reply to Susi Lehtola from comment #2)
> (In reply to Dmitry from comment #0)
> > I compiled code from source and GDB says:
> > #11 0x00007ffff7701671 in OpenBabel::OBConversion::FullConvert
> > (this=this@entry=0x7fffffffd9c0, FileList=std::vector of length 1, capacity
> > 1 = {...}, OutputFileName="", 
> >     OutputFileList=std::vector of length 0, capacity 0) at
> > /home/madchem/openbabel-2.3.2/openbabel/src/obconversion.cpp:1486
> > 1486	        Count = Convert(pIs,pOs);
> 
> Note that this is totally unnecessary. You just need to
>  # debuginfo-install openbabel-debuginfo
> after which you can run all debugging tools without problems.
> 
> You didn't include the problematic output file in the report. Please try out
> the scratch build of the newer release at
> https://koji.fedoraproject.org/koji/taskinfo?taskID=18698475

Doesn't work for me. Same problem.

Comment 4 Dmitry 2017-04-01 11:16:32 UTC
Created attachment 1268092 [details]
NWChem output file

babel -inwo naoh.out -oxyz
must provide XYZ-matrix

Comment 5 Dmitry 2017-04-01 11:22:34 UTC
Created attachment 1268093 [details]
NWChem output file

babel -inwo calc.nwo -oxyz
must produce XYZ-matrix

Comment 6 Susi Lehtola 2017-05-23 19:40:52 UTC
Thanks for the test cases. I just checked that the last output is parsed properly with openbabel's development version. Unfortunately, as you checked before, the newest stable release, 2.4.1, still has this problem.

Comment 7 Dmitry 2017-05-23 22:03:06 UTC
(In reply to Susi Lehtola from comment #6)
> Thanks for the test cases. I just checked that the last output is parsed
> properly with openbabel's development version. Unfortunately, as you checked
> before, the newest stable release, 2.4.1, still has this problem.

Yes, the development version works for me too. I guess the dev and stable version has a few changes, so you may push the new build to fedora-testing.

Thank you for answer! :3

Comment 8 Fedora End Of Life 2017-07-25 23:08:28 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 9 Dominik 'Rathann' Mierzejewski 2017-07-30 13:00:16 UTC
Bumping to rawhide where it still occurs. Sorry for not fixing this earlier. I'll see what I can do.

Comment 10 Jan Kurik 2017-08-15 08:10:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 11 Ben Cotton 2018-11-27 18:33:30 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2018-11-30 17:46:54 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Dominik 'Rathann' Mierzejewski 2018-12-02 23:30:46 UTC
FWIW, I cannot reproduce this on Fedora 29. Please file a new bug if it's reproducible on F28.


Note You need to log in before you can comment on or make changes to this bug.