8205687: TimeoutHandler generates huge core files
Use kill instead of gcore to generate core file Reviewed-by: dholmes
This commit is contained in:
parent
ca477652c2
commit
d5142e7240
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,7 +55,8 @@ public final class GathererFactory {
|
||||
Properties osProperty = Utils.getProperties(osName);
|
||||
try {
|
||||
ActionHelper helper = new ActionHelper(workdir, "config", osProperty, jdks);
|
||||
return new ToolKit(helper, log, osName, "common");
|
||||
// os-specific action set must be last, b/c they can kill the process
|
||||
return new ToolKit(helper, log, "common", osName);
|
||||
} catch (InvalidValueException e) {
|
||||
throw new IllegalStateException("can't create tool kit", e);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,9 +56,6 @@ public class ToolKit implements EnvironmentInfoGatherer, ProcessInfoGatherer {
|
||||
pids.add(pid);
|
||||
for (Long p = pids.poll(); p != null; p = pids.poll()) {
|
||||
HtmlSection pidSection = section.createChildren("" + p);
|
||||
for (ActionSet set : actions) {
|
||||
set.gatherProcessInfo(pidSection, p);
|
||||
}
|
||||
List<Long> children = helper.getChildren(pidSection, p);
|
||||
if (!children.isEmpty()) {
|
||||
HtmlSection s = pidSection.createChildren("children");
|
||||
@ -67,6 +64,9 @@ public class ToolKit implements EnvironmentInfoGatherer, ProcessInfoGatherer {
|
||||
}
|
||||
pids.addAll(children);
|
||||
}
|
||||
for (ActionSet set : actions) {
|
||||
set.gatherProcessInfo(pidSection, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,9 +52,9 @@ native.stack.args=--pid=%p\0-batch\0-ex\0thread apply all backtrace
|
||||
native.stack.args.delimiter=\0
|
||||
native.stack.params.repeat=6
|
||||
|
||||
native.core.app=gcore
|
||||
native.core.args=-o ./core.%p %p
|
||||
native.core.params.timeout=3600000
|
||||
# has to be the last command
|
||||
native.core.app=kill
|
||||
native.core.args=-ABRT %p
|
||||
################################################################################
|
||||
# environment info to gather
|
||||
################################################################################
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,11 +61,9 @@ native.stack.delimiter=\0
|
||||
native.stack.params.repeat=6
|
||||
native.stack.args=-c\0DevToolsSecurity --status | grep -q enabled && lldb -o 'attach %p' -o 'thread backtrace all' -o 'detach' -o 'quit'
|
||||
|
||||
native.core.app=bash
|
||||
native.core.delimiter=\0
|
||||
native.core.args=-c\0gcore -o ./core.%p %p || \
|
||||
(DevToolsSecurity --status | grep -q enabled && lldb --batch -o 'attach %p' -o 'process save-core core.%p' -o 'detach' -o 'quit')
|
||||
native.core.params.timeout=3600000
|
||||
# has to be the last command
|
||||
native.core.app=kill
|
||||
native.core.args=-ABRT %p
|
||||
################################################################################
|
||||
# environment info to gather
|
||||
################################################################################
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,9 +51,9 @@ native.stack.app=pstack
|
||||
native.stack.args=-F %p
|
||||
native.stack.params.repeat=6
|
||||
|
||||
native.core.app=gcore
|
||||
native.core.args=-F -o ./core %p
|
||||
native.core.params.timeout=3600000
|
||||
# has to be the last command
|
||||
native.core.app=kill
|
||||
native.core.args=-ABRT %p
|
||||
################################################################################
|
||||
# environment info to gather
|
||||
################################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user