Skip to content

Commit 654cef3

Browse files
authored
CA-421991: Fix QEMU coredumps on XS9 (#6793)
On XS8, systemd's coredump handler ignores the process core rlimit so QEMU coredumps work correctly. On XS9, systemd's coredump handler respects the process core rlimit so QEMU coredumps end up truncated to 64 MiB which prevents gdb from loading them correctly. Fix this by removing the setting of the core rlimit from the wrapper so that it behaves like XS8. This is fine since the systemd coredump handler ensures that the root fs will not run out of space.
2 parents 862a44b + 2686b01 commit 654cef3

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

ocaml/xenopsd/scripts/qemu-wrapper

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ def restrict_fsize():
6565
limit = 1024 * 1024
6666
setrlimit(RLIMIT_FSIZE, (limit, limit))
6767

68-
def enable_core_dumps():
69-
70-
limit = 64 * 1024 * 1024
71-
oldlimits = getrlimit(RLIMIT_CORE)
72-
hardlimit = oldlimits[1]
73-
if limit > hardlimit:
74-
hardlimit = limit
75-
setrlimit(RLIMIT_CORE, (limit, hardlimit))
76-
return limit
77-
7868
def xenstore_read(path):
7969
return xenstore.read("", path)
8070

@@ -117,9 +107,6 @@ def prepare_exec():
117107
print("Warning: writing pid to '%s' cgroup.procs file: %s" \
118108
% (cgroup_slice, e))
119109

120-
core_dump_limit = enable_core_dumps()
121-
print("core dump limit: %d" % core_dump_limit)
122-
123110
if not file_serial:
124111
restrict_fsize()
125112

0 commit comments

Comments
 (0)