Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4969

CLI-based safe-restart kills hudson windows service

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • cli
    • None
    • Windows Server 2003

      When I do

      java -jar hudson-cli.jar -s <url> safe-restart

      The winstone server stops and starts but afterward, the hudson service is no longer running. The second call to safe-restart fails after this because the service isn't running.

      This is from the hudson.err.log

      Nov 15, 2009 3:58:11 AM hudson.remoting.Channel$ReaderThread run
      SEVERE: I/O error in channel CLI channel from /127.0.0.1
      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(Unknown Source)
      at java.io.FilterInputStream.read(Unknown Source)
      at java.io.BufferedInputStream.fill(Unknown Source)
      at java.io.BufferedInputStream.read(Unknown Source)
      at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
      at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
      at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at hudson.remoting.Channel$ReaderThread.run(Channel.java:849)

      and this from the hudson.wrapper.log

      2009-11-15 03:58:16 - Stopping hudson
      2009-11-15 03:58:16 - ProcessKill 1560
      2009-11-15 03:58:16 - Finished hudson
      2009-11-15 03:58:17 - Starting e:\hudson\java\jdk1.6.0_17\bin\java -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "E:\hudson\hudson.war" --httpPort=80
      2009-11-15 03:58:17 - Started 3720

      No indication of error there.

      Windows creates a *.cab file containing a hudson.exe.mdmp file which I used to gather the following:

      Microsoft (R) Windows Debugger Version 6.11.0001.404 X86
      Copyright (c) Microsoft Corporation. All rights reserved.

      Loading Dump File [C:\Documents and Settings\dhauslad\Desktop\New Folder\31DC67\hudson.exe.mdmp]
      User Mini Dump File: Only registers, stack and portions of memory are available

      Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols
      Executable search path is: e:\hudson
      Windows Server 2003 Version 3790 (Service Pack 2) MP (2 procs) Free x86 compatible
      Product: Server, suite: TerminalServer SingleUserTS
      Machine Name:
      Debug session time: Sun Nov 15 03:58:18.000 2009 (GMT-5)
      System Uptime: not available
      Process Uptime: 0 days 0:00:01.000
      .......................
      This dump file has an exception of interest stored in it.
      The stored exception information can be accessed via .ecxr.
      (e6c.e98): CLR exception - code e0434f4d (first/second chance not available)
      eax=00000801 ebx=77e62311 ecx=00000810 edx=00035e89 esi=00000240 edi=00000000
      eip=7c82860c esp=030edff4 ebp=030ee064 iopl=0 nv up ei ng nz ac pe cy
      cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000297
      ntdll!KiFastSystemCallRet:
      7c82860c c3 ret
      0:006> kb
      ChildEBP RetAddr Args to Child
      030edff0 7c827d29 77e61d1e 00000240 00000000 ntdll!KiFastSystemCallRet
      030edff4 77e61d1e 00000240 00000000 030ee038 ntdll!ZwWaitForSingleObject+0xc
      030ee064 77e61c8d 00000240 00004e20 00000000 kernel32!WaitForSingleObjectEx+0xac
      030ee078 7a045429 00000240 00004e20 b7395680 kernel32!WaitForSingleObject+0x12
      030ee0a8 7a04596f 00000240 00004e20 b739534c mscorwks!ClrWaitForSingleObject+0x24
      030ee564 7a04810c 000001ec 00000240 00000238 mscorwks!RunWatson+0x1df
      030eeca8 7a0487d2 030eefe8 00000001 001a7458 mscorwks!DoFaultReportWorker+0xb59
      030eece4 7a0973ea 030eefe8 00000001 030eefe8 mscorwks!DoFaultReport+0xc3
      030eed08 7a09c05f 001a7458 030eefe8 00000001 mscorwks!WatsonLastChance+0x3f
      030eed60 7a09c10b 030eefc0 77e761b7 030eefe8 mscorwks!CLRAddVectoredHandlers+0x209
      030eed68 77e761b7 030eefe8 00000000 00000000 mscorwks!InternalUnhandledExceptionFilter+0x22
      030eefc0 77e792a3 030eefe8 77e61ac1 030eeff0 kernel32!UnhandledExceptionFilter+0x12a
      030eefc8 77e61ac1 030eeff0 00000000 030eeff0 kernel32!BaseThreadStart+0x4a
      030eeff0 7c828772 030ef3ac 030effdc 030ef0cc kernel32!_except_handler3+0x61
      030ef014 7c828743 030ef3ac 030effdc 030ef0cc ntdll!ExecuteHandler2+0x26
      030ef0bc 7c82865c 030ea000 030ef0cc 00010007 ntdll!ExecuteHandler+0x24
      030ef39c 77e4bef7 030ef3ac 030ef434 e0434f4d ntdll!RtlRaiseException+0x3d
      030ef3fc 79ef2bbc e0434f4d 00000001 00000001 kernel32!RaiseException+0x53
      030ef45c 79fccf80 0101a8d8 00000000 00000000 mscorwks!RaiseTheExceptionInternalOnly+0x2a8

          • WARNING: Unable to verify checksum for mscorlib.ni.dll
            030ef520 799cf8c1 0101a71c 792e4beb 010340ec mscorwks!JIT_Throw+0xfc
            0:006> .load C:\windows\Microsoft.Net\Framework\v2.0.50727\SOS.dll
            ------------------------------------------------------------
            sos.dll needs a full memory dump for complete functionality.
            You can create one with .dump /ma <filename>
            ------------------------------------------------------------
            0:006> !clrstack
            OS Thread Id: 0xe98 (6)
            ESP EIP
            030ef484 7c82860c [HelperMethodFrame: 030ef484]
            030ef528 799cf8c1 System.IO.__Error.WinIOError(Int32, System.String)
            030ef584 792eb27b System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean)
            030ef67c 79299cbe System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean)
            030ef6ac 79298f18 System.IO.FileStream..ctor(System.String, System.IO.FileMode)
            030ef6c0 00bd2e03 winsw.WrapperService.CopyStreamWithRotation(System.IO.Stream, System.String, System.String)
            030ef7a8 00bd2d15 winsw.WrapperService+<>c_DisplayClass6.<HandleLogfiles>b_0()
            030ef7c0 792d6d66 System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
            030ef7cc 792e01ef System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
            030ef7e4 792d6ce4 System.Threading.ThreadHelper.ThreadStart()
            030efa0c 79e71b4c [GCFrame: 030efa0c]

            Unassigned Unassigned
            dhauslad dhauslad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: