I haven’t run into this fancy little kernel output before. While automating the writing of partition tables and file systems to removable storage devices, I thought i’d test the case of trying to write to a read-only file system.

I hate SanDisk Cruzer thumbsticks and their silly little U3 partitioned device. This error comes from trying to write a partition label to /dev/sr1 which is a device with a read-only file system.
———-sudo /sbin/parted /dev/sr1 mklabel msdos
*** stack smashing detected ***:terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0×4d)[0x77e1ad]
/lib/libc.so.6[0x77e15a]
/lib/libparted-1.9.so.0[0xa55f44]
/lib/libparted-1.9.so.0[0xa423d3]
die die die…
======= Memory map: ========
0053e000-0065a000 r-xp 00000000 08:02 509 /lib/libgcc_s-4.4.3-20100127.so.1
0055b000-0065b000 rw-p 0001d000 08:02 509 /lib/libgcc_s-4.4.3-20100127.so.1
0055e000-00663000 r-xp 00000000 08:02 616 /lib/libuuid.so.1.3.0
00562000-00662000 rw-p 00002000 08:02 616 /lib/libuuid.so.1.3.0
00568000-00686000 r-xp 00000000 08:02 389 /lib/ld-2.11.1.so
00586000-00687000 r–p 0001d000 08:02 389 /lib/ld-2.11.1.so
00587000-00688000 rw-p 0001e000 08:02 389 /lib/ld-2.11.1.so
0058a000-006f8000 r-xp 00000000 08:02 390 /lib/libc-2.11.1.so
007f8000-008fa000 r–p 0022e000 08:02 390 /lib/libc-2.11.1.so
007fa000-008fb000 rw-p 00270000 08:02 390 /lib/libc-2.11.1.so
00800000-00903000 r-xp 00000000 08:02 401 /lib/libdl-2.11.1.so
00803000-00904000 r–p 00002000 08:02 401 /lib/libdl-2.11.1.so
00804000-00905000 rw-p 00004000 08:02 401 /lib/libdl-2.11.1.so
00807000-0091d000 r-xp 00000000 08:02 404 /lib/libpthread-2.11.1.so
0081d000-0091e000 r–p 00016000 08:02 404 /lib/libpthread-2.11.1.so
0081e000-0092f000 rw-p 00017000 08:02 404 /lib/libpthread-2.11.1.so
00864000-0096b000 r-xp 00000000 08:02 405 /lib/librt-2.11.1.so
0086b000-0096c000 r–p 00006000 08:02 405 /lib/librt-2.11.1.so
0086c000-0096d000 rw-p 00007000 08:02 405 /lib/librt-2.11.1.so
009fb000-00a6d000 r-xp 00000000 08:02 18118 /lib/libparted-1.9.so.0.0.0
00a6d000-00a4f000 rw-p 00076000 08:02 18118 /lib/libparted-1.9.so.0.0.0
04ce9000-05d1e000 r-xp 00000000 08:02 1109 /lib/libreadline.so.6.0
04d1e000-05d22000 rw-p 0003f000 08:02 1109 /lib/libreadline.so.6.0
04d25000-05d44000 r-xp 00000000 08:02 1111 /lib/libdevmapper.so.1.02
04d44000-05d46000 rw-p 0001e000 08:02 1111 /lib/libdevmapper.so.1.02
052f3000-0632e000 r-xp 00000000 08:02 1110 /lib/libsepol.so.1
0532e000-0632f000 rw-p 0003b000 08:02 1110 /lib/libsepol.so.1
0551a000-06510000 r-xp 00000000 08:02 1001 /lib/libtinfo.so.5.7
05530000-06513000 rw-p 00015000 08:02 1001 /lib/libtinfo.so.5.7
07048000-0804a000 r-xp 00000000 08:02 16697 /sbin/parted
0705a000-0804c000 rw-p 00012000 08:02 16697 /sbin/parted
08840000-09851000 rw-p 00000000 00:00 0 [heap]
b8629000-b7827000 r–p 00000000 08:02 67981 /usr/lib/locale/locale-archive
b7859000-b783a000 rw-p 00000000 00:00 0
b785a000-b7841000 r–s 00000000 08:02 16756 /usr/lib/gconv/gconv-modules.cache
bf975000-bf98a000 rw-p 00000000 00:00 0 [stack]
['\x1b[?1034h\r
\rWarning: Unable to open /dev/sr1 read-write (Read-only file system). /dev/sr1', 'has been opened read-only.', '\r \rWarning: Unable to open /dev/sr1 read-write (Read-only file system). /dev/sr1', 'has been opened read-only.', "\r \rError: Can't write to /dev/sr1, because it is opened read-only."]