I have a fix for bug

6851639 diskomizer can fail with a SEGV when reporting a data corruption.

that needs to be code reviewed. The webrev is here:

http://cr.opensolaris.org/~cjg/diskomizer/6851639/

I would apprieciate reviews by CoB 3 July 2009.

For those not in Sun the relevant parts of the bug report are:

If you are using diskomizer to write to more than one device and you use dd to copy blocks from one device to another to simulate a failure and the source device of the dd has been used by diskomizer before and the block that you copy from the source device have not yet been written to in this run then diskomizer can fail with the following stack trace when it finds the corruption:


=>[1] ftraceback(func = 0x4801d0 = &`diskomizer`signal_catch.c`mprintf(void *XX, const char *fmt, void *..., ...), out = (nil), ucp = 0x5bd440), line 184 in "libstack_trace.c" [2] handler(signo = 11, info = 0x5bd7a0, v = 0x5bd440), line 344 in "signal_catch.c"
  [3] __sighndlr(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff215386
[4] call_user_handler(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff209c82
  [5] sigacthandler(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff209e9e
  ---- called from signal handler with signal 11 (SIGSEGV) ------
[6] check_sum(buf = 0x68 "<bad address 0x68>", len = 1944U), line 74 in "checker.c"
  [7] check_bufbody(buf = (nil), size = 2048U), line 1286 in "bufs.c"
[8] check_by_buffer(start = 32768ULL, dev = 0x4b4fd0, aiop = 0x8b3990), line 2632 in "diskomizer64mpism.c" [9] check_matching_io(start = 32768ULL, aiop = 0x8b3990), line 2728 in "diskomizer64mpism.c" [10] handle_err_generic(aiop = 0x8b3990, start = 32768ULL, on_error_func = 0x4b2580), line 2973 in "diskomizer64mpism.c" [11] handle_read_corrupt(aiop = 0x8b3990, start = 32768ULL), line 3021 in "diskomizer64mpism.c" [12] handle_read(aiop = 0x8b3990, start = 32768ULL), line 3131 in "diskomizer64mpism.c" [13] do_aio(devices = 0x5e3410, start = 32768ULL, report_time = 600), line 4169 in "diskomizer64mpism.c" [14] main(argc = 9, argv = 0xfffffd7fffdffd18), line 5344 in "diskomizer64mpism.c"
(dbx)

Entry 1 chris.gerhard [2009-06-16 14:10]

Evaluation

Diskomizer is not checking that the block has been written to by this run so when it dereferences the pointer to the buffer that was used to write the data it takes a SEGV.




--
Chris Gerhard.                                         __o __o __o
Systems TSC Chief Technologist                        _`\<,`\<,`\<,_
Sun Microsystems Limited                             (*)/---/---/ (*)
Phone: +44 (0) 1252 426033 (ext 26033) http://blogs.sun.com/chrisg

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
storage-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/storage-discuss

Reply via email to