obabel --partialcharge eem segfault

Bug #1824573 reported by Arslan Shaymardanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openbabel (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu release
==============

Description: Ubuntu 18.04.2 LTS
Release: 18.04

Description: Ubuntu 16.04.6 LTS
Release: 16.04

Package version
===============

Ubuntu 18.04.2 LTS
------------------

openbabel:
  Installed: 2.3.2+dfsg-3build1
  Candidate: 2.3.2+dfsg-3build1
  Version table:
 *** 2.3.2+dfsg-3build1 500
        500 http://ru.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

Ubuntu 16.04.6 LTS
------------------

openbabel:
  Installed: 2.3.2+dfsg-2.2build1
  Candidate: 2.3.2+dfsg-2.2build1
  Version table:
 *** 2.3.2+dfsg-2.2build1 500
        500 http://ru.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

What was expected
=================

No segfault when run
$ obabel in.mol2 -O out.mol2 --partialcharge eem
$ obabel -:"C" -O out.mol2 --gen3D --partialcharge eem

What happens instead
====================

Execution of
$ obabel in.mol2 -O out.mol2 --partialcharge eem
causes
Segmentation fault (core dumped)
while other supported --partialcharge methods work fine.
Such behaviour doesn't depend on input file (which is actually correct); you may reproduce it by
$ obabel -:"C" -O out.mol2 --gen3D --partialcharge eem
Bug occurs in openbabel v2.3.2 in different versions of Ubuntu (tested on 3 different PCs).

According to gdb output (below), the error is hidden somewhere in OpenBabel::EEMCharges::_luSolve method. But the only difference of _this method' code_ with the current version from github seems insufficient and behave the same

--- openbabel-2.3.2+dfsg/src/charges/eem.cpp 2019-04-12 20:07:59.969219832 +0300
+++ openbabel-github/src/charges/eem.cpp 2019-01-14 20:54:33.000000000 +0300
@@ -313,7 +317,7 @@
       }

     // do the backsubstitution
- for (i = dim - 1; i >= 0; --i)
+ for (i = dim; i-- != 0; )
       {
         B[i] /= A[i][i];
         for (k = 0; k < i; ++k)

so, i guess, it's located elsewhere.

$ gdb --args obabel -:"C" -O out.mol2 --gen3D --partialcharge eem
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from obabel...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/obabel -:C -O out.mol2 --gen3D --partialcharge eem
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe36c9700 (LWP 8465)]
[New Thread 0x7fffe2ec8700 (LWP 8466)]
[New Thread 0x7fffe26c7700 (LWP 8467)]
[New Thread 0x7fffe1ec6700 (LWP 8468)]
[New Thread 0x7fffe16c5700 (LWP 8469)]
[New Thread 0x7fffe0ec4700 (LWP 8470)]
[New Thread 0x7fffe06c3700 (LWP 8471)]
[New Thread 0x7fffdfec2700 (LWP 8472)]
[New Thread 0x7fffdf6c1700 (LWP 8473)]
[New Thread 0x7fffdeec0700 (LWP 8474)]
[New Thread 0x7fffde6bf700 (LWP 8475)]
[New Thread 0x7fffddebe700 (LWP 8476)]
[New Thread 0x7fffdd6bd700 (LWP 8477)]
[New Thread 0x7fffdcebc700 (LWP 8478)]
[New Thread 0x7fffdc6bb700 (LWP 8479)]

Thread 1 "obabel" received signal SIGSEGV, Segmentation fault.
0x00007fffedf7d5bc in OpenBabel::EEMCharges::_luSolve(double**, std::vector<int, std::allocator<int> >&, double*, unsigned int) () from /usr/lib/openbabel/2.3.2/plugin_charges.so

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: openbabel 2.3.2+dfsg-3build1
ProcVersionSignature: Ubuntu 4.15.0-47.50-generic 4.15.18
Uname: Linux 4.15.0-47-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 12 19:25:25 2019
InstallationDate: Installed on 2019-01-14 (88 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: openbabel
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Arslan Shaymardanov (ashaymardanov) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.