mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 18:07:57 +00:00
coredump: report missing files without a backtrace
New message: ERROR: Required file /usr/lib64/libcrypto.so.3.0.1 not found. Exiting Old message: File "/home/criu/coredump/criu_coredump/coredump.py", line 693, in _gen_mem_chunk f = open(fname, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib64/libcrypto.so.3.0.1' Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
3ca979f9a1
commit
edaec5d762
@ -1,5 +1,6 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
import criu_coredump
|
import criu_coredump
|
||||||
|
|
||||||
@ -34,7 +35,12 @@ def main():
|
|||||||
|
|
||||||
opts = vars(parser.parse_args())
|
opts = vars(parser.parse_args())
|
||||||
|
|
||||||
coredump(opts)
|
try:
|
||||||
|
coredump(opts)
|
||||||
|
except SystemExit as error:
|
||||||
|
print('ERROR: %s' % error)
|
||||||
|
print('Exiting')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -692,7 +692,11 @@ class coredump_generator:
|
|||||||
files = self.reg_files
|
files = self.reg_files
|
||||||
fname = next(filter(lambda x: x["id"] == shmid, files))["name"]
|
fname = next(filter(lambda x: x["id"] == shmid, files))["name"]
|
||||||
|
|
||||||
f = open(fname, 'rb')
|
try:
|
||||||
|
f = open(fname, 'rb')
|
||||||
|
except FileNotFoundError:
|
||||||
|
sys.exit('Required file %s not found.' % fname)
|
||||||
|
|
||||||
f.seek(off)
|
f.seek(off)
|
||||||
|
|
||||||
start = vma["start"]
|
start = vma["start"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user