# Win32-service Segmentation fault

**URL:** <https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160>\
**Category:** Ruby\
**Created:** [June 13, 2009, 1:59am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160 "2009-06-13T01:59:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 1:59am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/1 "2009-06-13T01:59:13Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 3:17am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/2 "2009-06-13T03:17:34Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 3:31am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/3 "2009-06-13T03:31:44Z")

</div>

Hi,

2009/6/13 Dan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> require ‘win32ole’  
> c:\>ruby check\_services\_test.rb  
> RAS Asynchronous Media Driver
> 
> Ideas?

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

sc.exe \mps-bes1 query

Regards,

Park H.

---

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 5:20am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/4 "2009-06-13T05:20:39Z")

</div>

Daniel B. wrote:

> > 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](http://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.

---

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 5:55am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/5 "2009-06-13T05:55:11Z")

</div>

Daniel B. wrote:

> > 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](http://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.

---

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 5:05am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/6 "2009-06-13T05:05:20Z")

</div>

Heesob P. wrote:

> Hi,
> 
> 2009/6/13 Dan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > require ‘win32ole’  
> > c:\>ruby check\_services\_test.rb  
> > RAS Asynchronous Media Driver
> > 
> > Ideas?
> 
> More information is needed for debugging this bug.  
> What’s the output of sc.exe ?
> 
> sc.exe \mps-bes1 query
> 
> Regards,
> 
> Park H.

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

---

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 7:28am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/7 "2009-06-13T07:28:04Z")

</div>

Heesob P. wrote:

> 2009/6/13 Dan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > > > unusual
> > > 
> > > Or, if you could step through the debugger, I’d love to see what the  
> > > Application Experience Lookup Service  
> > > system32\DRIVERS\audstub.sys  
> > > BlackBerry Controller  
> > > xe" -s jvmpath=“C:\Program Files\Java\jre1.6.0\_02\bin\client\jvm.dll”  
> > > 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.  
> > 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 H.

Brilliant! That worked.

Thanks Park.

---

<div class="post-metadata">

**Author:** ![dandiebolt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dandiebolt](https://www.ruby-forum.com/u/dandiebolt)\
**Post date:** [June 13, 2009, 6:17am UTC](https://www.ruby-forum.com/t/win32-service-segmentation-fault/170160/8 "2009-06-13T06:17:25Z")

</div>

2009/6/13 Dan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > > unusual
> > 
> > Or, if you could step through the debugger, I’d love to see what the  
> > Application Experience Lookup Service  
> > system32\DRIVERS\audstub.sys  
> > BlackBerry Controller  
> > xe" -s jvmpath=“C:\Program Files\Java\jre1.6.0\_02\bin\client\jvm.dll”  
> > 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.  
> 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 H.
