swift-llbuild icon indicating copy to clipboard operation
swift-llbuild copied to clipboard

[BuildDB] Lock db connection

Open dmbryson opened this issue 3 years ago • 2 comments

When the sqlite3 threading mode is 'serialized', sqlite3_errcode and sqlite3_errmsg may be stomped on by concurrent use. Per the documentation, threads should obtain exclusive use via sqlite3_db_mutex to ensure consistency of these values.

rdar://problem/60378054

dmbryson avatar Jun 14 '22 16:06 dmbryson

@swift-ci please smoke test

dmbryson avatar Jun 14 '22 16:06 dmbryson

0  llbuild         0x000000000049bf95
1  llbuild         0x000000000049b41c
2  llbuild         0x000000000049c64b
3  libpthread.so.0 0x00007fb7b6cae3c0
4  libsqlite3.so.0 0x00007fb7b707b3a4 sqlite3_db_mutex + 4
5  llbuild         0x000000000047baf2
6  llbuild         0x000000000046dc1d
7  llbuild         0x0000000000422b7b
8  llbuild         0x0000000000413d54
9  llbuild         0x000000000040b1df
10 libc.so.6       0x00007fb7b6acc0b3 __libc_start_main + 243
11 llbuild         0x000000000040a53e

note: command had no output on stdout or stderr
error: command failed with exit status: -11

😱

dmbryson avatar Jun 14 '22 17:06 dmbryson

@swift-ci test

shahmishal avatar Oct 29 '23 07:10 shahmishal

Testing Time: 10.27s
  Unsupported      :  11
  Passed           : 121
  Expectedly Failed:   1
  Failed           : 101

shahmishal avatar Oct 31 '23 04:10 shahmishal