Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psyscopg2 - Deleting a large table "crashes" the cluster #39671

Closed
mattcrdb opened this issue Aug 14, 2019 · 2 comments

Comments

@mattcrdb
Copy link

@mattcrdb mattcrdb commented Aug 14, 2019

Forum issue: https://forum.cockroachlabs.com/t/deleting-a-large-table-crashes-the-cluster/3018

Context:

I have set up a 3-node cluster to evaluate the use of CockroachDB for storing a large table. In my testing, I found a way to reproducibly crash the cockroach daemon on every node in the cluster.

I created a table called “bucket”, and generated 165 million rows of artificial data. When I execute a “DELETE FROM bucket” SQL command via the psycopg2 Python driver, the memory usage of the cockroach process increases rapidly until the machine runs out of memory and the process crashes with a std::bad_alloc error. Here are a few lines of context from the error log around the crash:

terminate called after throwing an instance of 'terminate called recursively
terminate called recursively
terminate called recursively
std::bad_alloc'
  what():  std::bad_alloc
SIGABRT: abort
The cluster is comprised of 3 virtual machines running CentOS 7.4. Each machine has 4 vCPUs, 8GB RAM, 10GB of swap space, and 100GB of disk space. The size of the “bucket” table at the time of the crash is 8GB with 462 ranges. Memory overcommitting is disabled at the kernel level (sysctl vm.overcommit_memory=2).

Environment:

  • CockroachDB version v19.1.3
  • Server OS: CentOS 7.4
  • Client app: psycopg2
@jordanlewis

This comment has been minimized.

Copy link
Member

@jordanlewis jordanlewis commented Aug 19, 2019

This was fixed by #36728 but apparently not backported.

@jordanlewis

This comment has been minimized.

Copy link
Member

@jordanlewis jordanlewis commented Sep 3, 2019

Fixed by #39733.

@jordanlewis jordanlewis closed this Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.