In a Linux server, I run a program and log its stdout and stderr outputs to a file by:myprogram.py > logfile 2>&1All the outputs to stdout and stderr are logged, except that some errors in the following are not but appear on the terminal. I wonder why not all the errors are logged?*** glibc detected *** xgboost: munmap_chunk(): invalid pointer: 0x0000000000bc0a10 ***======= Backtrace: =========/lib64/libc.so.6(+0x75f4e)[0x7f089d19ef4e]xxx/gcc/4.8.1/lib64/libgomp.so.1(+0x8d72)[0x7f089dc40d72]xgboost[0x40b1de]xgboost[0x41585d]xgboost[0x403f81]/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f089d147d5d]xgboost[0x403fd9]======= Memory map: ========00400000-00437000 r-xp 00000000 00:13 2044979336                         xxx/xgboost/v0.32/bin/xgboost00437000-00439000 rw-p 00037000 00:13 2044979336                         xxx/xgboost/v0.32/bin/xgboost00bae000-00d3c000 rw-p 00000000 00:00 0                                  [heap]7f0897791000-7f0897792000 ---p 00000000 00:00 07f0897792000-7f0898192000 rw-p 00000000 00:00 07f0898192000-7f0898193000 ---p 00000000 00:00 07f0898193000-7f0898b93000 rw-p 00000000 00:00 07f0898b93000-7f0898b94000 ---p 00000000 00:00 07f0898b94000-7f0899594000 rw-p 00000000 00:00 07f0899594000-7f0899595000 ---p 00000000 00:00 07f0899595000-7f0899f95000 rw-p 00000000 00:00 07f0899f95000-7f0899f96000 ---p 00000000 00:00 07f0899f96000-7f089a996000 rw-p 00000000 00:00 07f089a996000-7f089a997000 ---p 00000000 00:00 07f089a997000-7f089b397000 rw-p 00000000 00:00 07f089b397000-7f089b398000 ---p 00000000 00:00 07f089b398000-7f089c599000 rw-p 00000000 00:00 07f089cd1d000-7f089cd24000 r-xp 00000000 fc:01 414519                     /lib64/librt-2.12.so7f089cd24000-7f089cf23000 ---p 00007000 fc:01 414519                     /lib64/librt-2.12.so7f089cf23000-7f089cf24000 r--p 00006000 fc:01 414519                     /lib64/librt-2.12.so7f089cf24000-7f089cf25000 rw-p 00007000 fc:01 414519                     /lib64/librt-2.12.so7f089cf25000-7f089cf27000 r-xp 00000000 fc:01 414530                     /lib64/libdl-2.12.so7f089cf27000-7f089d127000 ---p 00002000 fc:01 414530                     /lib64/libdl-2.12.so7f089d127000-7f089d128000 r--p 00002000 fc:01 414530                     /lib64/libdl-2.12.so7f089d128000-7f089d129000 rw-p 00003000 fc:01 414530                     /lib64/libdl-2.12.so7f089d129000-7f089d2b3000 r-xp 00000000 fc:01 414538                     /lib64/libc-2.12.so7f089d2b3000-7f089d4b3000 ---p 0018a000 fc:01 414538                     /lib64/libc-2.12.so7f089d4b3000-7f089d4b7000 r--p 0018a000 fc:01 414538                     /lib64/libc-2.12.so7f089d4b7000-7f089d4b8000 rw-p 0018e000 fc:01 414538                     /lib64/libc-2.12.so7f089d4b8000-7f089d4bd000 rw-p 00000000 00:00 07f089d4bd000-7f089d4d4000 r-xp 00000000 fc:01 393354                     /lib64/libpthread-2.12.so7f089d4d4000-7f089d6d4000 ---p 00017000 fc:01 393354                     /lib64/libpthread-2.12.so7f089d6d4000-7f089d6d5000 r--p 00017000 fc:01 393354                     /lib64/libpthread-2.12.so7f089d6d5000-7f089d6d6000 rw-p 00018000 fc:01 393354                     /lib64/libpthread-2.12.so7f089d6d6000-7f089d6da000 rw-p 00000000 00:00 07f089d6da000-7f089d75d000 r-xp 00000000 fc:01 414534                     /lib64/libm-2.12.so7f089d75d000-7f089d95c000 ---p 00083000 fc:01 414534                     /lib64/libm-2.12.so7f089d95c000-7f089d95d000 r--p 00082000 fc:01 414534                     /lib64/libm-2.12.so7f089d95d000-7f089d95e000 rw-p 00083000 fc:01 414534                     /lib64/libm-2.12.so7f089d95e000-7f089d95f000 r-xp 00000000 fc:01 393364                     /lib64/snoopy.so7f089d95f000-7f089db5e000 ---p 00001000 fc:01 393364                     /lib64/snoopy.so7f089db5e000-7f089db5f000 rw-p 00000000 fc:01 393364                     /lib64/snoopy.so7f089db5f000-7f089db7f000 r-xp 00000000 fc:01 414524                     /lib64/ld-2.12.so7f089dc1c000-7f089dc22000 rw-p 00000000 00:00 07f089dc22000-7f089dc37000 r-xp 00000000 00:13 2044935698                 xxx/gcc/4.8.1/lib64/libgcc_s.so.17f089dc37000-7f089dc38000 rw-p 00015000 00:13 2044935698                 xxx/gcc/4.8.1/lib64/libgcc_s.so.17f089dc38000-7f089dc45000 r-xp 00000000 00:13 2044935716                 xxx/gcc/4.8.1/lib64/libgomp.so.1.0.07f089dc45000-7f089dc46000 rw-p 0000d000 00:13 2044935716                 xxx/gcc/4.8.1/lib64/libgomp.so.1.0.07f089dc74000-7f089dc76000 rw-p 00000000 00:00 07f089dc76000-7f089dd5a000 r-xp 00000000 00:13 2044935770                 xxx/gcc/4.8.1/lib64/libstdc++.so.6.0.187f089dd5a000-7f089dd5b000 ---p 000e4000 00:13 2044935770                 xxx/gcc/4.8.1/lib64/libstdc++.so.6.0.187f089dd5b000-7f089dd63000 r--p 000e4000 00:13 2044935770                 xxx/gcc/4.8.1/lib64/libstdc++.so.6.0.187f089dd63000-7f089dd65000 rw-p 000ec000 00:13 2044935770                 xxx/gcc/4.8.1/lib64/libstdc++.so.6.0.187f089dd65000-7f089dd7c000 rw-p 00000000 00:00 07f089dd7c000-7f089dd7e000 rw-p 00000000 00:00 07f089dd7e000-7f089dd7f000 r--p 0001f000 fc:01 414524                     /lib64/ld-2.12.so7f089dd7f000-7f089dd80000 rw-p 00020000 fc:01 414524                     /lib64/ld-2.12.so7f089dd80000-7f089dd81000 rw-p 00000000 00:00 07ffcf1520000-7ffcf156f000 rw-p 00000000 00:00 0                          [stack]7ffcf15ec000-7ffcf15ed000 r-xp 00000000 00:00 0                          [vdso]ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Some errors are not logged, after redirecting both stderr and stdout to a file
linux;bash;io redirection