Skip to content

postgres crashes while running pg_regress #202

@rishabhBudhouliya

Description

@rishabhBudhouliya

Bug

postgres crashes with "stack overflow" message after running 100 tests out of 240 tests in pg_regress

The GDB backtrace shows us:

Thread 220 "lind-fork-106" received signal SIGSEGV                                                                                                  
  #0 NoditMap<...vmmap::VmmapEntry>::insert_overwrite ()
  #1 <cage::memory::vmmap::Vmmap>::update ()                                                                                                          
  #2 <cage::memory::vmmap::Vmmap>::remove_entry ()
  #3 rawposix::fs_calls::brk_syscall ()

I also monitored the memory while execution of pg_regress:

  Time     | VSZ (KB)    | RSS (KB) | Threads                                                                                                         
  20:22:00 | 181,385,244 | 1,399,116 | 59    
  20:22:08 | 166,636,488 | 1,369,536 | 91                                                                                                             
  20:22:22 | 116,759,168 | 1,308,524 | 54                                                                                                             
  20:22:23 | CRASH

Steps to Reproduce

  1. Start postgres
    sudo ./scripts/lind_run /bin/postgres.cwasm -D /tmp/pgdata &
    sleep 3

  2. Create regression database
    sudo ./scripts/lind_run /bin/psql.cwasm -h /tmp -p 5432 -d postgres -c "CREATE DATABASE regression;"

  3. Run test_setup (creates base tables)
    sudo ./scripts/lind_run /bin/pg_regress.cwasm --use-existing --host=/tmp --port=5432 \
    --bindir=/bin --inputdir=/regress --expecteddir=/regress test_setup

  4. Run full schedule: crashes after ~100-200 tests
    sudo ./scripts/lind_run /bin/pg_regress.cwasm --use-existing --host=/tmp --port=5432 \
    --bindir=/bin --inputdir=/regress --expecteddir=/regress \
    --schedule=/regress/parallel_schedule --max-concurrent-tests=3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions