210 | | file |
211 | | }}} |
212 | | |
213 | | Make backups of the original mondoarchive and mondorestore binaries and copy they newly created over the original ones. |
214 | | |
215 | | == mondoarchive == |
216 | | |
217 | | == mondorestore == |
218 | | |
| 212 | file mondo/mondorestore/mondorestore |
| 213 | mondo/mondorestore/mondorestore: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), not stripped |
| 214 | }}} |
| 215 | |
| 216 | Make backups of the original '''mondoarchive''' and '''mondorestore''' binaries and copy they newly created over the original ones. |
| 217 | |
| 218 | == Trouble-Shooting mondoarchive == |
| 219 | |
| 220 | The best approach is to run the '''mondoarchive''' binary you just created with debugging symbols built in from its location in the built directory under gdb. So: |
| 221 | |
| 222 | {{{ |
| 223 | cd mondo/mondoarchive |
| 224 | gdb ./mondoarchive |
| 225 | run <usual arguments you use> |
| 226 | }}} |
| 227 | |
| 228 | When the segmentation fault happens, enter: |
| 229 | |
| 230 | {{{ |
| 231 | bt |
| 232 | }}} |
| 233 | |
| 234 | and send the output to the list. |
| 235 | |
| 236 | == Trouble-Shooting mondorestore == |
| 237 | |
| 238 | If you do partial restore onto a live system, the same approach as described for '''mondoarchive''' can be used. |
| 239 | |
| 240 | However, more likely you will experience a segmentation fault during restore. To run a backtrace in that situation proceeed as follows: |
| 241 | |
| 242 | First, you need a '''mondorestore''' binary with debugging symbols. This should already been taken care of if you copied the newly compiled binaries as described above. Next, you need to make sure that gdb is available on your restore media. To achieve this, add gdb to '''/etc/mindi/deplist.txt''' before doing a mondoarchive run. |
| 243 | |
| 244 | Boot the restore media into '''expert''' mode. Then start '''mondoarchive''' like this: |
| 245 | |
| 246 | {{{ |
| 247 | gdb /usr/sbin/mondorestore |
| 248 | run |
| 249 | }}} |
| 250 | |
| 251 | As described previously, once the segmentation fault happens, do: |
| 252 | |
| 253 | {{{ |
| 254 | bt |
| 255 | }}} |
| 256 | |
| 257 | and send the output to the list. (If you can't get the backtrace copied as text, you can use a photo of the screen as the last resort. |
| 258 | |
| 259 | == Advanced Topics == |
| 260 | |
| 261 | = Attaching to Running Processes = |
| 262 | |
| 263 | You can attach to a running process using: |
| 264 | |
| 265 | {{{ |
| 266 | attach <pid> |
| 267 | }}} |
| 268 | |
| 269 | where <pid> is the process ID. |
| 270 | |
| 271 | This can be particulary useful when running '''mondoarchive''' with the '-g' or when running '''mondorestore'''. |
| 272 | |
| 273 | = Using libraries with debugging symbols = |
| 274 | |
| 275 | The libraries used by a binary can be determined using the ldd command, e.g.: |
| 276 | |
| 277 | {{{ |
| 278 | ldd /usr/sbin/mondoarchive |
| 279 | libmondo.so.2 => /usr/lib/libmondo.so.2 (0xb7f8d000) |
| 280 | libmondo-newt.so.1 => /usr/lib/libmondo-newt.so.1 (0xb7f82000) |
| 281 | libnewt.so.0.51 => /usr/lib/libnewt.so.0.51 (0xb7f71000) |
| 282 | libdl.so.2 => /lib/tls/libdl.so.2 (0xb7f6e000) |
| 283 | libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7f5f000) |
| 284 | libc.so.6 => /lib/tls/libc.so.6 (0xb7e2a000) |
| 285 | libslang.so.1-UTF8 => /lib/libslang.so.1-UTF8 (0xb7db7000) |
| 286 | libm.so.6 => /lib/tls/libm.so.6 (0xb7d94000) |
| 287 | /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fea000) |
| 288 | }}} |
| 289 | |
| 290 | some of those libraries may come with debugging symbols built in as an alternative package, others can be buiolt from scratch and installed with debugging sysmbols installed. Using your distribtuion's standard built process is probably a good idea for this. |