Embedded server asserts on startup because of pbxt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Undecided
|
Sergey Petrunia | ||
PBXT |
Fix Committed
|
Undecided
|
Vladimir Kolesnikov |
Bug Description
Attempt to run any test with --embedded server will fail becasue of pbxt in the following way:
./mysql-test-run --embedded-server t/alias.test
"our" variable $opt_suites masks earlier declaration in same scope at ./mysql-test-run line 134.
Logging: ./mysql-test-run --embedded-server t/alias.test
091001 14:22:08 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.1.38
Checking supported features...
- skipping ndbcluster
- skipping SSL
- binaries are debug compiled
Collecting tests...
vardir: /home/psergey/
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/
Installing system database...
Using server port 52935
=======
TEST RESULT TIME (ms)
-------
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
091001 13:22:17 [Note] PrimeBase XT (PBXT) Engine 1.0.08d RC loaded...
091001 13:22:17 [Note] Paul McCullagh, PrimeBase Technologies GmbH, http://
main.alias [ fail ]
Test ended at 2009-10-01 14:22:17
CURRENT_TEST: main.alias
thd->thread_
thd=0xa6f7790 size=7092
mysqltest_embedded: sql_class.cc:1136: bool THD::store_
mysqltest got signal 6
read_command_buf at 0x89df0a0 =
Attempting backtrace...
thd->thread_
thd=0xa6f94e0 size=7092
mysqltest_embedded: sql_class.cc:1136: bool THD::store_
- saving '/home/
-------
The servers were restarted 0 times
Spent 0.000 of 15 seconds executing testcases
Failed 1/1 tests, 0.00% were successful.
Failing test(s): main.alias
Related branches
- Kristian Nielsen: Approve
-
Diff: 60 lines (+11/-10)4 files modifiedconfig/ac-macros/plugins.m4 (+7/-5)
sql/sql_plugin.cc (+3/-3)
storage/pbxt/plug.in (+1/-0)
storage/pbxt/src/Makefile.am (+0/-2)
Changed in maria: | |
status: | New → Confirmed |
Changed in pbxt: | |
status: | New → Confirmed |
Changed in maria: | |
status: | Confirmed → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
My analysis shows that PBXT (myxt_create_ thread( ) in storage/ pbxt/src/ myxt_xt. cc in particular) thinks that sizeof(THD) is 7092, globals( ) in particular) thinks that sizeof(THD) is 6880).
while the SQL layer (THD::store_
When myxt_create_ thread( ) will make this assignment:
new_thd- >thread_ stack = (char *) &new_thd;
it will "miss" the thread_stack variable and set value of something else. THD::store_ globals( ), which is called immediately after, will still see thread_stack==0 and fail an assertion.
The reason for sizeof difference seems to be that THD has different sizes depending on whether it is an embedded server or not. PBXT has sizeof(THD) from non-embedded server and hence fails in embedded server.