epam / epam/Indigo

Bingo in PostgreSQL, make database terminated abnormally easily

Open
#1,456 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

User`s Feedback
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

Steps to Reproduce

  1. PostgreSQL 12.6, compiled by Visual C++ build 1914, 64-bit
  2. Bingo 1.9.1.587-g0e3666ae7
  3. 32GB Memory just for pg

i got a table "substance"(import from pubchem), more than 40 million records.
bingo will easily make pg break down, even for simple SQL like this:

SELECT * FROM "substance"
WHERE iso_smiles @ ('Cc1cc(Cl)nnc1N', 'ALL')::bingo.exact;
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.

in the pg log:

2023-12-22 09:54:26.261 HKT [19104] LOG:  server process (PID 12960) was terminated by exception 0xC0000005
2023-12-22 09:54:26.261 HKT [19104] DETAIL:  Failed process was running: SELECT * FROM "substance"

	WHERE iso_smiles @ ('Cc1cc(Cl)nnc1N', 'ALL')::bingo.exact
2023-12-22 09:54:26.261 HKT [19104] HINT:  See C include file "ntstatus.h" for a description of the hexadecimal value.
2023-12-22 09:54:26.262 HKT [19104] LOG:  terminating any other active server processes
2023-12-22 09:54:26.266 HKT [19452] WARNING:  terminating connection because of crash of another server process

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported SQL against PostgreSQL 12.6 with Bingo 1.9.1.587 and the large substance table, then inspect the PostgreSQL log for the Windows access violation. Done means the query no longer causes the database server to terminate abnormally.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, postgresql
Domain
databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.