win32-service Segmentation fault

D

Dan Daniels

Having an issue with win32-service, it works on most 2003 servers I've
tried, but on several, it segfaults.

Platform: Windows Server 2003, Standard Edition Build 3790 Service Pack
2, I have other servers of the same level and they work fine.


require 'rubygems'
require 'win32/service'
require 'win32ole'

include Win32

host = 'mps-bes1'

Service.services( host, "" ){ |s|
puts s.display_name
puts ""
}

c:\>ruby check_services_test.rb
Application Experience Lookup Service

Alerter

Application Layer Gateway Service

Application Management

ASP.NET State Service

RAS Asynchronous Media Driver

Audio Stub Driver

BlackBerry Attachment Service

Background Intelligent Transfer Service

BlackBerry Controller

BlackBerry Database Consistency Service

BlackBerry Dispatcher

c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/lib/win32/serv
ice.rb:1100: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.


Ideas?

Thanks,
Dan
 
D

Daniel Berger

-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]]
Sent: Friday, June 12, 2009 5:59 PM
To: ruby-talk ML
Subject: win32-service Segmentation fault
=20
=20
Having an issue with win32-service, it works on most 2003 servers I've
tried, but on several, it segfaults.
=20
Platform: Windows Server 2003, Standard Edition Build 3790 Service = Pack
2, I have other servers of the same level and they work fine.
=20
=20
require 'rubygems'
require 'win32/service'
require 'win32ole'
=20
include Win32
=20
host =3D 'mps-bes1'
=20
Service.services( host, "" ){ |s|
puts s.display_name
puts ""
}
=20
c:\>ruby check_services_test.rb
Application Experience Lookup Service
=20
Alerter
=20
Application Layer Gateway Service
=20
Application Management
=20
ASP.NET State Service
=20
RAS Asynchronous Media Driver
=20
Audio Stub Driver
=20
BlackBerry Attachment Service
=20
Background Intelligent Transfer Service
=20
BlackBerry Controller
=20
BlackBerry Database Consistency Service
=20
BlackBerry Dispatcher
=20
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-
60/lib/win32/serv
ice.rb:1100: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]
=20
=20
This application has requested the Runtime to terminate it in an
unusual
way.
Please contact the application's support team for more information.

That's odd. Line 1100 is actually pure Ruby code:

binary_path =3D binary_path.unpack('Z*')[0]

I wonder if you've found a bug.

A few questions.

What version of Ruby are you running?
One click or hand built?
What version of win32-service?
Does it always segfault at the same place?

If it does segfault at the same place, can you open up your services =
explorer window and see what the next one on the list is?

Control Panel -> Administrative Tools -> Services

Or, if you could step through the debugger, I'd love to see what the =
'binary_path' variable is set to when it dies.

Regards,

Dan
 
H

Heesob Park

Hi,

2009/6/13 Dan Daniels said:
Having an issue with win32-service, it works on most 2003 servers I've
tried, but on several, it segfaults.

Platform: Windows Server 2003, Standard Edition Build 3790 Service Pack
2, I have other servers of the same level and they work fine.


require 'rubygems'
require 'win32/service'
require 'win32ole'

include Win32

host =3D 'mps-bes1'

Service.services( host, "" =C2=A0){ |s|
=C2=A0puts s.display_name
=C2=A0puts ""
}

c:\>ruby check_services_test.rb
Application Experience Lookup Service

Alerter

Application Layer Gateway Service

Application Management

ASP.NET State Service

RAS Asynchronous Media Driver

Audio Stub Driver

BlackBerry Attachment Service

Background Intelligent Transfer Service

BlackBerry Controller

BlackBerry Database Consistency Service

BlackBerry Dispatcher

c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/lib/win= 32/serv
ice.rb:1100: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.


Ideas?
More information is needed for debugging this bug.
What's the output of sc.exe ?

sc.exe \\mps-bes1 query


Regards,

Park Heesob
 
D

Dan Daniels

Heesob said:
Hi,


More information is needed for debugging this bug.
What's the output of sc.exe ?

sc.exe \\mps-bes1 query


Regards,

Park Heesob


W:\>sc \\mps-bes1 query

SERVICE_NAME: AeLookupSvc
DISPLAY_NAME: Application Experience Lookup Service
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(NOT_STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))

WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: AudioSrv
DISPLAY_NAME: Windows Audio
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BBAttachServer
DISPLAY_NAME: BlackBerry Attachment Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BITS
DISPLAY_NAME: Background Intelligent Transfer Service
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BlackBerry Controller
DISPLAY_NAME: BlackBerry Controller
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BlackBerry Dispatcher
DISPLAY_NAME: BlackBerry Dispatcher
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BlackBerry MDS Connection Service
DISPLAY_NAME: BlackBerry MDS Connection Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BlackBerry Policy Service
DISPLAY_NAME: BlackBerry Policy Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BlackBerry Router
DISPLAY_NAME: BlackBerry Router
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BlackBerry Server Alert
DISPLAY_NAME: BlackBerry Alert
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: BlackBerry SyncServer
DISPLAY_NAME: BlackBerry Synchronization Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Browser
DISPLAY_NAME: Computer Browser
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: CryptSvc
DISPLAY_NAME: Cryptographic Services
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: DcomLaunch
DISPLAY_NAME: DCOM Server Process Launcher
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(NOT_STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))

WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Dhcp
DISPLAY_NAME: DHCP Client
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: dmserver
DISPLAY_NAME: Logical Disk Manager
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Dnscache
DISPLAY_NAME: DNS Client
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: ERSvc
DISPLAY_NAME: Error Reporting Service
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Eventlog
DISPLAY_NAME: Event Log
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(NOT_STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: EventSystem
DISPLAY_NAME: COM+ Event System
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: helpsvc
DISPLAY_NAME: Help and Support
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: IISADMIN
DISPLAY_NAME: IIS Admin Service
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: lanmanserver
DISPLAY_NAME: Server
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: lanmanworkstation
DISPLAY_NAME: Workstation
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: LmHosts
DISPLAY_NAME: TCP/IP NetBIOS Helper
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: MSDTC
DISPLAY_NAME: Distributed Transaction Coordinator
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: MSExchangeMGMT
DISPLAY_NAME: Microsoft Exchange Management
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: MSMQ
DISPLAY_NAME: Message Queuing
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: NetBackup INET Daemon
DISPLAY_NAME: NetBackup Client Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Netlogon
DISPLAY_NAME: Net Logon
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Netman
DISPLAY_NAME: Network Connections
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Nla
DISPLAY_NAME: Network Location Awareness (NLA)
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: NtLmSsp
DISPLAY_NAME: NT LM Security Support Provider
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: ntrtscan
DISPLAY_NAME: OfficeScanNT RealTime Scan
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: PlugPlay
DISPLAY_NAME: Plug and Play
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(NOT_STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: PolicyAgent
DISPLAY_NAME: IPSEC Services
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: ProtectedStorage
DISPLAY_NAME: Protected Storage
TYPE : 120 WIN32_SHARE_PROCESS (interactive)
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: RemoteRegistry
DISPLAY_NAME: Remote Registry
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: RpcSs
DISPLAY_NAME: Remote Procedure Call (RPC)
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(NOT_STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))

WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: SamSs
DISPLAY_NAME: Security Accounts Manager
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(NOT_STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))

WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Schedule
DISPLAY_NAME: Task Scheduler
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: seclogon
DISPLAY_NAME: Secondary Logon
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: SENS
DISPLAY_NAME: System Event Notification
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: ShellHWDetection
DISPLAY_NAME: Shell Hardware Detection
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: Spooler
DISPLAY_NAME: Print Spooler
TYPE : 110 WIN32_OWN_PROCESS (interactive)
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: TermService
DISPLAY_NAME: Terminal Services
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(NOT_STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))

WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: tmlisten
DISPLAY_NAME: OfficeScan NT Listener
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: TrkWks
DISPLAY_NAME: Distributed Link Tracking Client
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: VMTools
DISPLAY_NAME: VMware Tools Service
TYPE : 110 WIN32_OWN_PROCESS (interactive)
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: VRTSpbx
DISPLAY_NAME: Symantec Private Branch Exchange
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN))
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: W32Time
DISPLAY_NAME: Windows Time
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: winmgmt
DISPLAY_NAME: Windows Management Instrumentation
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: wuauserv
DISPLAY_NAME: Automatic Updates
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

SERVICE_NAME: WZCSVC
DISPLAY_NAME: Wireless Configuration
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE,
ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
 
D

Dan Daniels

Daniel said:
Platform: Windows Server 2003, Standard Edition Build 3790 Service Pack

Application Layer Gateway Service

ice.rb:1100: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]


This application has requested the Runtime to terminate it in an
unusual
way.
Please contact the application's support team for more information.

That's odd. Line 1100 is actually pure Ruby code:

binary_path = binary_path.unpack('Z*')[0]

I wonder if you've found a bug.

A few questions.

What version of Ruby are you running?
One click or hand built?
What version of win32-service?
Does it always segfault at the same place?

If it does segfault at the same place, can you open up your services
explorer window and see what the next one on the list is?

Control Panel -> Administrative Tools -> Services

Or, if you could step through the debugger, I'd love to see what the
'binary_path' variable is set to when it dies.

Regards,

Dan

One-click install, installed win32-service via gem install command just
a few days ago. version 0.6.1-x86-mswin32-60.

W:\>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

BlackBerry MDS Connection Service is the next service in the list.

Yes, it consistently stops exactly same place, even if the "puts
s.display_name" line is commented out.

Yesterday in testing different things, it seg faulted and listed
string.rb as the culprit. I can't duplicate that today.

Installing ruby-debug, new territory for me. I will post value of
'binary_path' variable soon.

Oddly enough, from a Vista box it, the same *exact* script (against
mps-bes1 also) goes past that service and gets near the end until it
crashes in the same fashion.

w:\>check_services_test.rb
Application Experience Lookup Service

Alerter

Application Layer Gateway Service

Application Management

ASP.NET State Service

RAS Asynchronous Media Driver

Audio Stub Driver

BlackBerry Attachment Service

Background Intelligent Transfer Service

BlackBerry Controller

BlackBerry Database Consistency Service

BlackBerry Dispatcher

BlackBerry MDS Connection Service

BlackBerry Policy Service

BlackBerry Router

BlackBerry Alert

BlackBerry Synchronization Service

Computer Browser

Indexing Service

ClipBook

NET Runtime Optimization Service v2.0.50727_X86

Microsoft AC Adapter Driver

COM+ System Application

Cryptographic Services

Logical Disk Manager Administrative Service

Logical Disk Manager

Error Reporting Service

COM+ Event System

Fips

Help and Support

Human Interface Device Access

HTTP

HTTP SSL

IIS Admin Service

IMAPI CD-Burning COM Service

IPv6 Windows Firewall Driver

IP Traffic Filter Driver

IP in IP Tunnel Driver

IP Network Address Translator

IR Enumerator Service

Intersite Messaging

Server

License Logging

Messenger

NetMeeting Remote Desktop Sharing

Message Queuing access control

WebDav Client Redirector

Microsoft Exchange Management

Windows Installer

Message Queuing

Microsoft System Management BIOS Driver

Remote Access NDIS TAPI Driver

Remote Access NDIS WAN Driver

NetBackup Client Service

NetBackup SAN Client Fibre Transport Service

Network DDE DSDM

Network Connections

Network Location Awareness (NLA)

File Replication

NT LM Security Support Provider

Removable Storage

OfficeScanNT RealTime Scan

PDCOMP

PDFRAME

PDRELI

PDRFRAME

IPSEC Services

WAN Miniport (PPTP)

Protected Storage

Direct Parallel Link Driver

Remote Access Auto Connection Manager

WAN Miniport (L2TP)

Remote Access Connection Manager

Remote Access PPPOE Driver

Direct Parallel

Terminal Server Device Redirector Driver

RDPWD

Remote Desktop Help Session Manager

Routing and Remote Access

Remote Registry

Remote Procedure Call (RPC) Locator

Resultant Set of Policy Provider

Special Administration Console Helper

Secdrv

Secondary Logon

Windows Firewall/Internet Connection Sharing (ICS)

c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/lib/win32/serv
ice.rb:1328: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual
way.
 
D

Dan Daniels

Daniel said:
Platform: Windows Server 2003, Standard Edition Build 3790 Service Pack

Application Layer Gateway Service

ice.rb:1100: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]


This application has requested the Runtime to terminate it in an
unusual
way.
Please contact the application's support team for more information.

That's odd. Line 1100 is actually pure Ruby code:

binary_path = binary_path.unpack('Z*')[0]

I wonder if you've found a bug.

A few questions.

What version of Ruby are you running?
One click or hand built?
What version of win32-service?
Does it always segfault at the same place?

If it does segfault at the same place, can you open up your services
explorer window and see what the next one on the list is?

Control Panel -> Administrative Tools -> Services

Or, if you could step through the debugger, I'd love to see what the
'binary_path' variable is set to when it dies.

Regards,

Dan

I inserted "puts binary_path" on line 1101 in services.rb.

W:\>ruby check_services_test.rb
C:\WINDOWS\system32\svchost.exe -k netsvcs
Application Experience Lookup Service
C:\WINDOWS\system32\svchost.exe -k LocalService
Alerter
C:\WINDOWS\System32\alg.exe
Application Layer Gateway Service
C:\WINDOWS\system32\svchost.exe -k netsvcs
Application Management
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_state.exe
ASP.NET State Service
system32\DRIVERS\asyncmac.sys
RAS Asynchronous Media Driver
system32\DRIVERS\audstub.sys
Audio Stub Driver
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\AttachServer\B
BAttachServer.exe" 1900 1999 3 32
BlackBerry Attachment Service
C:\WINDOWS\system32\svchost.exe -k netsvcs
Background Intelligent Transfer Service
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\BlackBerryCont
roller.exe"
BlackBerry Controller
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\MDS\bin\DBCons
istency.exe"
BlackBerry Database Consistency Service
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\BlackBerryDisp
atcher.exe"
BlackBerry Dispatcher
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\MDS\bin\bmds.e
xe" -s jvmpath="C:\Program Files\Java\jre1.6.0_02\bin\client\jvm.dll"
-XX:+Disab
leExplicitGC -Xss64K -Xmx768M -Xms128M classpathdir="C:\Program
Files\Research I
n Motion\BlackBerry
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/lib/win32/serv
ice.rb:1154:in `>': comparison of String with 0 failed (ArgumentError)
from
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/l
ib/win32/service.rb:1154:in `services'
from
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/l
ib/win32/service.rb:1057:in `upto'
from
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/l
ib/win32/service.rb:1057:in `services'
from check_services_test.rb:12


If I change line 1101 to "puts binary_path.inspect", the script
completes without error.
 
H

Heesob Park

2009/6/13 Dan Daniels said:
Daniel said:
Platform: Windows Server 2003, Standard Edition Build 3790 Service Pack

Application Layer Gateway Service

ice.rb:1100: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-mswin32]


This application has requested the Runtime to terminate it in an
unusual
way.
Please contact the application's support team for more information.

That's odd. Line 1100 is actually pure Ruby code:

binary_path =3D binary_path.unpack('Z*')[0]

I wonder if you've found a bug.

A few questions.

What version of Ruby are you running?
One click or hand built?
What version of win32-service?
Does it always segfault at the same place?

If it does segfault at the same place, can you open up your services
explorer window and see what the next one on the list is?

Control Panel -> Administrative Tools -> Services

Or, if you could step through the debugger, I'd love to see what the
'binary_path' variable is set to when it dies.

Regards,

Dan

I inserted "puts binary_path" on line 1101 in services.rb.

W:\>ruby check_services_test.rb
C:\WINDOWS\system32\svchost.exe -k netsvcs
Application Experience Lookup Service
C:\WINDOWS\system32\svchost.exe -k LocalService
Alerter
C:\WINDOWS\System32\alg.exe
Application Layer Gateway Service
C:\WINDOWS\system32\svchost.exe -k netsvcs
Application Management
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_state.exe
ASP.NET State Service
system32\DRIVERS\asyncmac.sys
RAS Asynchronous Media Driver
system32\DRIVERS\audstub.sys
Audio Stub Driver
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\AttachServer\B
BAttachServer.exe" 1900 1999 3 32
BlackBerry Attachment Service
C:\WINDOWS\system32\svchost.exe -k netsvcs
Background Intelligent Transfer Service
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\BlackBerryCont
roller.exe"
BlackBerry Controller
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\MDS\bin\DBCons
istency.exe"
BlackBerry Database Consistency Service
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\BlackBerryDisp
atcher.exe"
BlackBerry Dispatcher
"C:\Program Files\Research In Motion\BlackBerry Enterprise
Server\MDS\bin\bmds.e
xe" -s jvmpath=3D"C:\Program Files\Java\jre1.6.0_02\bin\client\jvm.dll"
-XX:+Disab
leExplicitGC -Xss64K -Xmx768M -Xms128M classpathdir=3D"C:\Program
Files\Research I
n Motion\BlackBerry
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/lib/win= 32/serv
ice.rb:1154:in `>': comparison of String with 0 failed (ArgumentError)
=C2=A0 =C2=A0 =C2=A0 =C2=A0from
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/l
ib/win32/service.rb:1154:in `services'
=C2=A0 =C2=A0 =C2=A0 =C2=A0from
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/l
ib/win32/service.rb:1057:in `upto'
=C2=A0 =C2=A0 =C2=A0 =C2=A0from
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/l
ib/win32/service.rb:1057:in `services'
=C2=A0 =C2=A0 =C2=A0 =C2=A0from check_services_test.rb:12


If I change line 1101 to "puts binary_path.inspect", the script
completes without error.
I guess the error is due to too long path string.
Altering line #1098
binary_path =3D 0.chr * 260
to
binary_path =3D 0.chr * 1024
will fix the problem.

Regards,
Park Heesob
 
D

Dan Daniels

Heesob said:
I guess the error is due to too long path string.
Altering line #1098
binary_path = 0.chr * 260
to
binary_path = 0.chr * 1024
will fix the problem.

Regards,
Park Heesob



Brilliant! That worked.

Thanks Park.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top