cactid 0.8.6i race condition???

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

cactid 0.8.6i race condition???

Post by Vladimir Pasashnikov »

Hi,

I've used cactid with 10 threads. And some times I saw situation like on pic. Previous copy of cactid didn't end (bottom windows). Than new copy of cactid may not end againg. and so on. It's look like race condition. When I set use only 1 thread everything is ok.
But I've got too many data sources and 1 thread is not enough!

Is it BUG???

cactid 0.8.6i. OS: Windows 2003 Server Enterprice.
Attachments
bug.JPG
bug.JPG (124.75 KiB) Viewed 3194 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

How many scripts are you running? How many script server scripts are you running. You can see this quite simply by going to Utilities->View Poller Cache. The "Action" filter will allow you to display the counts.

I have seen some other reports of issues related to Cactid 0.8.6i and scripts. I am thinking it is a cygwin problem, but have not confirmed it yet. Also, do you have cygwin installed, or are you using the provided DLL's?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

TheWitness wrote:How many scripts are you running? How many script server scripts are you running. You can see this quite simply by going to Utilities->View Poller Cache. The "Action" filter will allow you to display the counts.

I have seen some other reports of issues related to Cactid 0.8.6i and scripts. I am thinking it is a cygwin problem, but have not confirmed it yet. Also, do you have cygwin installed, or are you using the provided DLL's?

TheWitness
I'm running 18 scripts and 12 script servers.
No I haven't cygwin installed. I'm using provided DLL's.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Could you check your process status when running with more than 1 thread for "extra" running "cmd.exe" or "sh.exe" processes? Also, you do have "sh.exe" insalled right?

Use process explorer from (sysinternals.com) and make sure you are viewing the processes in "Group View". Attach a screen shot.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

TheWitness wrote:Could you check your process status when running with more than 1 thread for "extra" running "cmd.exe" or "sh.exe" processes? Also, you do have "sh.exe" insalled right?

Use process explorer from (sysinternals.com) and make sure you are viewing the processes in "Group View". Attach a screen shot.

TheWitness
I have "sh.exe" installed, but it's requare cygintl-3.dll which absent in cactid distribution.
At this moment i'm installing full cygwin version, after i'll try again.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ahhhhh, interesting. This may explain a few things.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

More than that I am afraid.

TheWitness
Attachments
sh-imports..JPG
sh-imports..JPG (19.68 KiB) Viewed 3161 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

TheWitness wrote:More than that I am afraid.

TheWitness
Mmmm.. Interesting... But may be this dll requare one of imported dll?
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

TheWitness wrote:Ahhhhh, interesting. This may explain a few things.

TheWitness
At last. I've just install full cygwin. And set thread to 10. everything is ok! But sh.exe is still buggy.

----Before cygwin ----
Host[17] DEBUG: The POPEN returned the following File Descriptor 17

Host[17] ERROR: Empty result [srv-storage01.spb.flash.int]: 'c:\php\php.exe -q c:\Inetpub\wwwroot\cacti\scripts\Win32_PerfFormattedData_PerfDisk_LogicalDisk.php srv-storage01.spb.flash.int get AvgDiskQueueLength D:'

Host[17] DS[120] WARNING: Result from SCRIPT not valid. Partial Result: ...

----After cygwin ------
Could not open input file: c:InetpubwwwrootcactiscriptsWin32_PerfFormattedData_PerfDisk_LogicalDisk.php
29631 [unknown (0x1544)] cactid 3760 sig_send: wait for sig_complete event failed, signal -34, rc 258, Win32 error 0
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

Vladimir Pasashnikov wrote:
TheWitness wrote:Ahhhhh, interesting. This may explain a few things.

TheWitness
At last. I've just install full cygwin. And set thread to 10. everything is ok! But sh.exe is still buggy.

----Before cygwin ----
Host[17] DEBUG: The POPEN returned the following File Descriptor 17

Host[17] ERROR: Empty result [srv-storage01.spb.flash.int]: 'c:\php\php.exe -q c:\Inetpub\wwwroot\cacti\scripts\Win32_PerfFormattedData_PerfDisk_LogicalDisk.php srv-storage01.spb.flash.int get AvgDiskQueueLength D:'

Host[17] DS[120] WARNING: Result from SCRIPT not valid. Partial Result: ...

----After cygwin ------
Could not open input file: c:InetpubwwwrootcactiscriptsWin32_PerfFormattedData_PerfDisk_LogicalDisk.php
29631 [unknown (0x1544)] cactid 3760 sig_send: wait for sig_complete event failed, signal -34, rc 258, Win32 error 0
Oh nooo.... Just hang.. Already 2 cactid processes are waiting something...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Change your back slashes to forward slashes in your data input method, and then clear your poller cache.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

TheWitness wrote:Change your back slashes to forward slashes in your data input method, and then clear your poller cache.

TheWitness
No, All paths are correct. Trouble is in the function clean_up_path($path). Because it's only one place where slashes are replace. In this function cacti check configuration option read_config_option("using_cygwin"), but using_cygwin is not defined in the settings table. And after I added using_cygwin this error is gone.
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

TheWitness wrote:Could you check your process status when running with more than 1 thread for "extra" running "cmd.exe" or "sh.exe" processes? Also, you do have "sh.exe" insalled right?

Use process explorer from (sysinternals.com) and make sure you are viewing the processes in "Group View". Attach a screen shot.

TheWitness
Look at the pictures below. 1 cactid process and 10 threads.
Work time about 1.5 hours:(
Attachments
bug_2.JPG
bug_2.JPG (94.13 KiB) Viewed 3101 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

That's some way old code. Cygwin 1.5.22 released today. Some of the bugs affect Cactid.
Changes since 1.5.21-1:

- Add 'hh', 'j', 't', and 'z' modifiers to printf(3). (Eric Blake)


Fixes since 1.5.21-1:

- Fix a case in fcntl where a F_UNLCK operation returns the wrong value.
(corinna)

- Fix serial IO timeout problem. (corinna)

- Fix pread in case current file offset is non-zero. (Hideki Iwamoto)

- Fix permission problem in initgroups. (corinna)

- Don't allow empty environment variables. (cgf)

- Translate ERROR_MORE_DATA to EMSGSIZE. (cgf)

- Remove compilation problem in asm/byteorder.h header (Danny Smith)

- Always open files with backup/restore intent to emulate real "root"
access. Fix access(2) accordingly. (corinna)

- Import latest glob(3) from FreeBSD to overcome non-POSIXyness. (corinna)

- Fix rewinddir problem on WIndows 2000. (corinna)

- Print correct Win32 error number when aborting due to fatal error.
(corinna)

- Change heap and mmap allocation to circumvent fork problems on
Windows 2003 and Vista. (corinna)


- Fix bug in opening raw disks. (Joe Loh)

- Fix a bug in popen implementation. (Eric Blake)

- Un-constify _LIB_VERSION. (Patrick Mansfield)

- Fix memory leak when threads exit. (corinna)
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
Vladimir Pasashnikov
Posts: 22
Joined: Thu Dec 08, 2005 3:47 am

Post by Vladimir Pasashnikov »

TheWitness wrote:That's some way old code. Cygwin 1.5.22 released today. Some of the bugs affect Cactid.
Changes since 1.5.21-1:

- Add 'hh', 'j', 't', and 'z' modifiers to printf(3). (Eric Blake)


Fixes since 1.5.21-1:

- Fix a case in fcntl where a F_UNLCK operation returns the wrong value.
(corinna)

- Fix serial IO timeout problem. (corinna)

- Fix pread in case current file offset is non-zero. (Hideki Iwamoto)

- Fix permission problem in initgroups. (corinna)

- Don't allow empty environment variables. (cgf)

- Translate ERROR_MORE_DATA to EMSGSIZE. (cgf)

- Remove compilation problem in asm/byteorder.h header (Danny Smith)

- Always open files with backup/restore intent to emulate real "root"
access. Fix access(2) accordingly. (corinna)

- Import latest glob(3) from FreeBSD to overcome non-POSIXyness. (corinna)

- Fix rewinddir problem on WIndows 2000. (corinna)

- Print correct Win32 error number when aborting due to fatal error.
(corinna)

- Change heap and mmap allocation to circumvent fork problems on
Windows 2003 and Vista. (corinna)


- Fix bug in opening raw disks. (Joe Loh)

- Fix a bug in popen implementation. (Eric Blake)

- Un-constify _LIB_VERSION. (Patrick Mansfield)

- Fix memory leak when threads exit. (corinna)
Ok. I'll try.
What's about my post "PostPosted: Tue Nov 14, 2006 9:24 am"?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests