epam / epam/Indigo

Segfault while rebuilding index on molfile using bingo.molecule type

Open
#1,884 1 comment 0 reactions 0 assignees View on GitHub
Priority: High Severity: High User`s Feedback
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

**Steps to Reproduce**
1. Use Indigo library (Bingo cartridge). Describe environment
*Note: this issue is not 100% reproducible in our environment with a given set of data. It only seems to happen maybe 1/5 or 1/8 of the time.

OS:
(output from uname -a):
Linux bpeqabirdmlapvm02 4.18.0-240.15.1.el8_3.x86_64 #1 SMP Mon Mar 1 17:16:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

CentOS Linux release 8.3.2011

32 Gb RAM
8 CPU's

Output from "select version();":

PostgreSQL 12.9 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4), 64-bit

276 Gb available on the filesystem on which PostgreSQL keeps its data and logs.

2. Add script or SQL to reproduce the issue
See attached file.

[script.txt](https://github.com/epam/Indigo/files/14794064/script.txt)

**Actual behavior**
During or immediately after the rebuild of the bingo index, the OS records a segfault. The PostgreSQL log records a corrupted double-linked list, then PostgreSQL terminates and restarts.

Attached is an excerpt from /var/log/messages.
[messages.txt](https://github.com/epam/Indigo/files/14794075/messages.txt)

Attached is an excerpt of the PostgreSQL log:
(note that the stored procedure source.uspupsertmolecule executes the CREATE INDEX statement that seems to be failing. The next stored proc in the pipeline is source.uspupsertlot).

Note the error "corrupted double-linked list".

[postgresql-log.txt](https://github.com/epam/Indigo/files/14794086/postgresql-log.txt)

**Expected behavior**
The bingo index should be rebuilt with no segfaults thrown, and the pipeline should continue on afterwards as normal. No "corrupted double-linked list" should be mentioned in the PostgreSQL log.

**Environment details:**
- Back-end version
Bingo 1.9.0

**Attachments**
Three attachments included.

**Additional context**
Add any other context about the problem here.

We are in the process of upgrading to the latest version of bingo, but reading through the release notes, I did not see any fixed bugs that looked like the issue we're experiencing. The closest ones had to do with CDX files, and we are parsing molfiles instead.

Fixed in 1.10:

[#1068](https://github.com/epam/Indigo/issues/1068) CDX-loader crash

Fixed in 1.12:

[#1126](https://github.com/epam/Indigo/issues/1126) Segfault when iterating CDX file from USPTO downloads

Fixed in 1.13:

[#1139](https://github.com/epam/Indigo/issues/1139) core dumped when reading CDX file downloaded from USPTO

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached script.txt and the PostgreSQL and system log excerpts, then inspect the CREATE INDEX call made by source.uspupsertmolecule. Reproduce the Bingo 1.9.0 molfile index rebuild on the stated PostgreSQL environment, noting that the failure is intermittent. Done means the index rebuild completes without a segfault, corrupted double-linked list, or PostgreSQL restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.