Advertisement
Guest User

Untitled

a guest
Nov 17th, 2010
864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.31 KB | None | 0 0
  1. [14 Aug 9:07] Serge Kozlov
  2. Description:
  3. MySQL server got assertion in innodb code when performing attached dump file:
  4.  
  5. Installing MySQL system tables...
  6. OK
  7. Filling help tables...
  8. OK
  9. 100814 10:42:03 [Note] Plugin 'FEDERATED' is disabled.
  10. 100814 10:42:03 [Note] Plugin 'ndbcluster' is disabled.
  11. InnoDB: The InnoDB memory heap is disabled
  12. InnoDB: Mutexes and rw_locks use InnoDB's own implementation
  13. InnoDB: Compressed tables use zlib 1.2.3
  14. InnoDB: The first specified data file ./ibdata1 did not exist:
  15. InnoDB: a new database to be created!
  16. 100814 10:42:03 InnoDB: Setting file ./ibdata1 size to 10 MB
  17. InnoDB: Database physically writes the file full: wait...
  18. 100814 10:42:03 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
  19. InnoDB: Setting log file ./ib_logfile0 size to 5 MB
  20. InnoDB: Database physically writes the file full: wait...
  21. 100814 10:42:04 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
  22. InnoDB: Setting log file ./ib_logfile1 size to 5 MB
  23. InnoDB: Database physically writes the file full: wait...
  24. InnoDB: Doublewrite buffer not found: creating new
  25. InnoDB: Doublewrite buffer created
  26. InnoDB: 127 rollback segment(s) active.
  27. InnoDB: Creating foreign key constraint system tables
  28. InnoDB: Foreign key constraint system tables created
  29. 100814 10:42:04 InnoDB 1.2.0 started; log sequence number 0
  30. 100814 10:42:04 [Warning] No existing UUID has been found, so we assume that this is the
  31. first time that this server has been started. Generating a new UUID:
  32. 0d1bd0be-a76f-11df-b155-0800272f46ab.
  33. 100814 10:42:04 [Note] Event Scheduler: Loaded 0 events
  34. 100814 10:42:04 [Note]
  35. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld: ready for
  36. connections.
  37. Version: '5.6.99-m5-log' socket: '/tmp/socket.1' port: 10000 Source distribution
  38. 100814 10:42:07 [Note] Start binlog_dump to slave_server(2), pos(, 4)
  39. InnoDB: Dump of the tablespace extent descriptor: len 40; hex
  40. 0000000000000000ffffffff0000ffffffff000000000002aaffffffffffffffffffffffffffffff; asc
  41. ;
  42. InnoDB: Serious error! InnoDB is trying to free page 4
  43. InnoDB: though it is already marked as free in the tablespace!
  44. InnoDB: The tablespace free space info is corrupt.
  45. InnoDB: You may need to dump your InnoDB tables and recreate the whole
  46. InnoDB: database!
  47. InnoDB: Please refer to
  48. InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
  49. InnoDB: about forcing recovery.
  50. 100814 10:42:07 InnoDB: Assertion failure in thread 2779286416 in file fsp/fsp0fsp.c
  51. line 3276
  52. InnoDB: We intentionally generate a memory trap.
  53. InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
  54. InnoDB: If you get repeated assertion failures or crashes, even
  55. InnoDB: immediately after the mysqld startup, there may be
  56. InnoDB: corruption in the InnoDB tablespace. Please refer to
  57. InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
  58. InnoDB: about forcing recovery.
  59. 100814 10:42:07 - mysqld got signal 6 ;
  60. This could be because you hit a bug. It is also possible that this binary
  61. or one of the libraries it was linked against is corrupt, improperly built,
  62. or misconfigured. This error can also be caused by malfunctioning hardware.
  63. We will try our best to scrape up some info that will hopefully help diagnose
  64. the problem, but since we have already crashed, something is definitely wrong
  65. and this may fail.
  66.  
  67. key_buffer_size=8388608
  68. read_buffer_size=131072
  69. max_used_connections=2
  70. max_threads=151
  71. thread_count=2
  72. connection_count=2
  73. It is possible that mysqld could use up to
  74. key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337835 K
  75. bytes of memory
  76. Hope that's ok; if not, decrease some variables in the equation.
  77.  
  78. thd: 0xaefda88
  79. Attempting backtrace. You can use the following information to find out
  80. where mysqld died. If you see no messages after this, something went
  81. terribly wrong...
  82. stack_bottom = 0xa5a88398 thread_stack 0x30000
  83. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(my_print_stacktrace+0x39)[0x8601b79]
  84. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(handle_segfault+0x39d)[0x82406bd]
  85. [0xef1420]
  86. /lib/libc.so.6(abort+0x101)[0x3c6631]
  87. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x852d72a]
  88. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x852e108]
  89. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x84d2f04]
  90. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x84d73a4]
  91. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x8537e00]
  92. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x8494a91]
  93. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x8470d31]
  94. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x84b46fe]
  95. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x84b4c0d]
  96. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld[0x84258bb]
  97. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(_Z17ha_rollback_transP3THDb+0xa3)[0x833f873]
  98. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(_Z19trans_rollback_stmtP3THD+0x24)[0x83d25c4]
  99. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(_Z21mysql_execute_commandP3THD+0x1d0)[0x8254570]
  100. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x14d)[0x825c80d]
  101. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1525)[0x825dd55]
  102. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(_Z10do_commandP3THD+0xc1)[0x825e191]
  103. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(_Z24do_handle_one_connectionP3THD+0x704)[0x824d804]
  104. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/sql/.libs/lt-mysqld(handle_one_connection+0x3c)[0x824e03c]
  105. /lib/libpthread.so.0[0x51546b]
  106. /lib/libc.so.6(clone+0x5e)[0x46cdbe]
  107. Trying to get some variables.
  108. Some pointers may be invalid and cause the dump to abort...
  109. thd->query at 0xaf4d148 = UPDATE t5 SET c_04 = 0, c_02 = '$<
  110. OYE8N{q(rAzg+jYN.xxVJ~W_6@[};~oj %61L8+W| 8C|kIlF~J%w[/irb~]m(#L9BR5|/ze
  111. w7WJUP{<T:g##<:b&Gq X@%(QOZ_AOozahZf_QVru~3X:!-H9L?1/]Slzk>c#8~NhIC-Z} XIe <v
  112. oks*;hg?kDHTH(LtRD', c_05= '9543-04-21 11:55:56' WHERE c_04 = 0 AND c_02 = '$<
  113. OYE8N{q(rAzg+jYN.xxVJ~W_6@[};~oj %61L8+W| 8C|kIlF~J%w[/irb~]m(#L9BR5|/ze
  114. w7WJUP{<T:g##<:b&Gq X@%(QOZ_AOozahZf_QVru~3X:!-H9L?1/]Slzk>c#8~NhIC-Z} XIe <v
  115. oks*;hg?kDHTH(LtRD'
  116. thd->thread_id=1
  117. thd->killed=NOT_KILLED
  118. The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
  119. information that should help you find out what is causing the crash.
  120. /home/ksm/oracle/repo/nuts/var/bin/rep::basic/1/5.6.99-m5/client/.libs/lt-mysqladmin:
  121. connect to server at 'localhost' failed
  122. error: 'Can't connect to local MySQL server through socket '/tmp/socket.1' (111)'
  123. Check that mysqld is running and that the socket: '/tmp/socket.1' exists!
  124.  
  125. How to repeat:
  126. Run attached dump file or try to record attached MTR test case
  127. [14 Aug 9:12] Serge Kozlov
  128. MTR test case and dump file
  129.  
  130. Attachment: bug_assert_fsp0fsp.tgz (application/x-gzip, text), 1.30 KiB.
  131. [23 Aug 10:08] Jimmy Yang
  132. In essential, a rollback of an update on a table contains BLOB field would deallocate
  133. external stored data (space, page) for the BLOB:
  134.  
  135. Simply the repro to following steps:
  136.  
  137. mysql> CREATE TABLE t4(c1 int, c2, int, c3 MEDIUMBLOB, PRIMARY KEY(c1)) engine = innodb;
  138.  
  139. mysql> insert into t4 values(1, 2, REPEAT('b', 54903));
  140. Query OK, 1 row affected (30.91 sec)
  141.  
  142. mysql> start transaction;
  143.  
  144. mysql> update t4 set c1 = 3;
  145.  
  146. mysql> rollback; <=== This rollback removes all external stored BLOB
  147.  
  148. mysql> start transaction;
  149.  
  150. mysql> update t4 set c1 = 3;
  151.  
  152. mysql> rollback; <=== Cannot find the page for external field
  153.  
  154. (gdb) c
  155. Continuing.
  156. InnoDB: Dump of the tablespace extent descriptor: len 40; hex
  157. 0000000000000000ffffffff0000ffffffff000000000002aaffffffffffffffffffffffffffffff; asc
  158. ;
  159. InnoDB: Serious error! InnoDB is trying to free page 4
  160. InnoDB: though it is already marked as free in the tablespace!
  161. InnoDB: The tablespace free space info is corrupt.
  162. InnoDB: You may need to dump your InnoDB tables and recreate the whole
  163. InnoDB: database!
  164. InnoDB: Please refer to
  165. InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
  166. InnoDB: about forcing recovery.
  167. .....
  168.  
  169. 100823 1:03:10 InnoDB: Assertion failure in thread 3000892272 in file
  170. /home/jy/work/mysql5.6_1/mysql-next-mr-innodb/storage/innobase/fsp/fsp0fsp.c line 3276
  171.  
  172. The key for such failure is the deallocation of external stored fields for the original
  173. data during the update rollback. More info will be updated.
  174. [23 Aug 12:56] Jimmy Yang
  175. Here is the detail info of the problem.
  176.  
  177. In short, the external stored blob data is freed in the rollback, while it shouldn't,
  178. since the data is inherited from the original row. Such deletion basically delete the
  179. original blob data.
  180.  
  181. The reason it is freed is because the BTR_EXTERN_INHERITED_FLAG is not set on the
  182. field:
  183.  
  184. In btr_cur_mark_dtuple_inherited_extern(), the status BTR_EXTERN_INHERITED_FLAG is not
  185. marked on the field. Thus during rollback when btr_free_externally_stored_field() is
  186. called, following condition evaluated to false, and it proceeds to free:
  187.  
  188. btr_free_externally_stored_field()
  189. {
  190. ...
  191. 4572 if (/* There is no external storage data */
  192. 4573 page_no == FIL_NULL
  193. 4574 /* This field does not own the externally stored field */
  194. 4575 || (mach_read_from_1(field_ref + BTR_EXTERN_LEN)
  195. 4576 & BTR_EXTERN_OWNER_FLAG)
  196. 4577 /* Rollback and inherited field */
  197. 4578 || ((rb_ctx == RB_NORMAL || rb_ctx == RB_RECOVERY)
  198. 4579 && (mach_read_from_1(field_ref + BTR_EXTERN_LEN)
  199. 4580 & BTR_EXTERN_INHERITED_FLAG))) {
  200. 4581
  201. 4582 /* Do not free */
  202. 4583 mtr_commit(&mtr); <==== Should come in here
  203. 4584
  204. 4585 return;
  205. 4586 }
  206.  
  207. ....
  208. }
  209.  
  210. The reason that BTR_EXTERN_INHERITED_FLAG is not marked because function to mark it
  211. (btr_cur_mark_dtuple_inherited_extern() is not called at all:
  212.  
  213. row_upd_clust_rec_by_insert()
  214. {
  215. if (node->upd_ext) { <==== node->upd_ext is NULL
  216. /* If we return from a lock wait, for example, we may have
  217. extern fields marked as not-owned in entry (marked in the
  218. if-branch above). We must unmark them. */
  219.  
  220. btr_cur_unmark_dtuple_extern_fields(entry);
  221.  
  222. /* We must mark non-updated extern fields in entry as
  223. inherited, so that a possible rollback will not free them. */
  224.  
  225. btr_cur_mark_dtuple_inherited_extern(entry, node->update);
  226. }
  227. }
  228.  
  229. So in our case, node->upd_ext is NULL. And node->upd_ext can be updated in
  230. row_upd_replace():
  231.  
  232. row_upd_replace()
  233. {
  234. for (col_no = 0; col_no < n_cols; col_no++) {
  235. ....
  236. if (dfield_is_ext(dfield) && col->ord_part) { <== in our case,
  237. col->ord_part is 0
  238. ext_cols[n_ext_cols++] = col_no;
  239. }
  240. }
  241.  
  242. if (n_ext_cols) {
  243. *ext = row_ext_create(n_ext_cols, ext_cols, row,
  244. dict_table_zip_size(table), heap);
  245. } else {
  246. *ext = NULL;
  247. }
  248. }
  249.  
  250. 8: dfield_is_ext(dfield) = 1
  251. (gdb) p col->ord_part
  252. $106 = 0
  253.  
  254. As a result node->upd_ext is NULL, btr_cur_mark_dtuple_inherited_extern() is not called
  255. to mark BTR_EXTERN_INHERITED_FLAG bit, and during rollback,
  256. btr_free_externally_stored_field() frees the external data while it shouldn't.
  257. And if the update/rollback is called again, it would find the external data are already
  258. freed.
  259. [24 Aug 0:00] Sunny Bains
  260. Thank you for your bug report. This issue has been committed to our source repository of
  261. that product and will be incorporated into the next release.
  262.  
  263. If necessary, you can access the source repository and build the latest available
  264. version, including the bug fix. More information about accessing the source trees is
  265. available at
  266.  
  267. http://dev.mysql.com/doc/en/installing-source.html
  268. [24 Aug 3:27] Jimmy Yang
  269. Duplicate of bug #55543
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement