iPrint Debugging: How to force a core file

  • 7022854
  • 13-Apr-2018
  • 13-Apr-2018


iPrint Appliance 2.x
iPrint Appliance 3.x
Open Enterprise Server 11
Open Enterprise Server 2015
Open Enterprise Server 2018


The Print Manager Daemon (ipsmd) stops unexpectedly.  Information from logs is not sufficient to diagnose or resolve the problem.  A core file is needed by the iPrint development team to go further in the investigation process.


Below lists two methods to capture a core file.  The first method assumes that a core file can be written as a result of a crash.  The second assumes that the ipsmd process is not actually crashing, but halting, and therefore no core file is written at the time of failure. 
  1. Capture a core as the result of a daemon crash.
    • If possible, obtain a debug version of the novell-iprint-server code.
      • Useful information can be obtained without a debug version of ipsmd.  But better, more detailed, information can be obtained if running a debug version.
    • Paste the following string of commands into a terminal session (while logged in as root):
      • ulimit -c unlimited;install -m 1777 -d /var/local/dumps;echo "/var/local/dumps/core.%e.%p"> /proc/sys/kernel/core_pattern;rcapparmor stop;sysctl -w kernel.suid_dumpable=2;killall -9 ipsmd;killall -9 iprintgw;killall -9 papercut;killall -9 lprsrvrd;rcnovell-ipsmd start
        • Some of the processes listed in the above kill statements will not be running, so you will see a message that <process name> no process found.  That is fine.
    • Wait for the crash
      • After the crash, gather this information:
        • Time and date of the crash
        • These files:
          • /var/opt/novell/log/iprint/ipsmd.log
          • /var/opt/novell/iprint/<print manager name and context>.psm/padbtxt.xml
          • /var/opt/novell/iprint/<print manager name and context>.psm/psmdb.dat
          • /var/log/apache2/error_log
          • /var/local/dumps/ <all the files here>
        • Start the print manager.
          • rcnovell-ipsmd start
  2. Generate a core file from a halted process.
    • If this is an iPrint Appliance server, there is an extra step needed of typing this command:
      • zypper in screen
        • This command works only if the iPrint Appliance is registered for updates.
    • Attach gdb to the ipsmd child process.
      • Open a putty session to the iPrint server (logged in as root) and type:
        • cd /tmp
        • screen
        • <hit the space bar>
        • <hit the space bar>
        • ps -ef | grep ipsmd
          • The output will be similar to this:
            • iprint   16218     1  0 00:04 ?        00:00:00 /opt/novell/iprint/bin/ipsmd
            • iprint   16219 16218  0 00:04 ?        00:00:29 /opt/novell/iprint/bin/ipsmd
              • In the above example, the first listed process (16218) is the parent process.  The parent process will have a gid of '1'.  The second listed process (16219) is the child process.
        • Type these commands:
          • gdb /opt/novell/iprint/bin/ipsmd
            • wait for the (gdb) prompt
          • attach 16219
            • 16219 is an example.  Replace that with the child PID in your situation.
          • c (and hit the ENTER key)
            • typing 'c' and hitting the ENTER key will instruct gdb to continue running ipsmd.
            • Close the putty session if you like.
    • Once printing has halted, get back to the gdb session
      • If the first putty session is still open, use that.  Or, if you had closed the first putty session, that is fine.  Open a new putty session and type:
        • screen -x
        • The gdb session will be visible.  Type these commands:
      • generate-core-file
      • quit
      • y
      • rcnovell-ipsmd restart
    • Share the following with Micro Focus support:
    • Time and date of the crash
      • /var/opt/novell/log/iprint/ipsmd.log
      • /var/opt/novell/iprint/<print manager name and context>.psm/padbtxt.xml
      • /var/opt/novell/iprint/<print manager name and context>.psm/psmdb.dat
      • /var/log/apache2/error_log
      • The core file(s) in the /tmp directory.