Skip to content

Commit

Permalink
cell: Prevent interpreter stack overflow from killing the domain
Browse files Browse the repository at this point in the history
This no longer causes a dCache crash:

cd System
define env x
exec env x
.
exec env x

Now it simply outputs an error message stating that a stack overflow
happened. Before it caused the domain to restart.

Target: trunk
Require-notes: yes
Require-book: no
Request: 2.10
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7352/
(cherry picked from commit 8378b5e)
  • Loading branch information
gbehrmann committed Oct 13, 2014
1 parent 7f5ac10 commit ac5421e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/cells/src/main/java/dmg/cells/nucleus/CellShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,8 @@ private String run_reader(URI uri, Args args)
}

return args.hasOption("nooutput") ? "" : out.toString();
} catch (StackOverflowError e) {
throw new CommandExitException("Stack overflow", 2, e);
} catch (FileNotFoundException e) {
throw new CommandException(66, e.getMessage(), e);
} catch (IOException e) {
Expand Down

0 comments on commit ac5421e

Please sign in to comment.