Details
-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
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/bzr-new/mysql-5.1-maria-contd4/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/psergey/bzr-new/mysql-5.1-maria-contd4/mysql-test/var'...
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://www.primebase.org
main.alias [ fail ]
Test ended at 2009-10-01 14:22:17
CURRENT_TEST: main.alias
thd->thread_stack=0x1 addr is 0xa6f80b4
thd=0xa6f7790 size=7092
mysqltest_embedded: sql_class.cc:1136: bool THD::store_globals(): Assertion `thread_stack' failed.
mysqltest got signal 6
read_command_buf at 0x89df0a0 =
Attempting backtrace...
thd->thread_stack=0x1 addr is 0xa6f9e04
thd=0xa6f94e0 size=7092
mysqltest_embedded: sql_class.cc:1136: bool THD::store_globals(): Assertion `thread_stack' failed.
- saving '/home/psergey/bzr-new/mysql-5.1-maria-contd4/mysql-test/var/log/main.alias/' to '/home/psergey/bzr-new/mysql-5.1-maria-contd4/mysql-test/var/log/main.alias/'
------------------------------------------------------------
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
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: Embedded server asserts on startup because of pbxt
My analysis shows that PBXT (myxt_create_thread() in storage/pbxt/src/myxt_xt.cc in particular) thinks that sizeof(THD) is 7092,
while the SQL layer (THD::store_globals() in particular) thinks that sizeof(THD) is 6880).
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.