返回代码4294967295(UINT_MAX) [英] Return code of 4294967295 (UINT_MAX)

查看:1407
本文介绍了返回代码4294967295(UINT_MAX)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人对这个问题有任何了解我会碰到我会

非常感谢你能写信给我......


我正在Solaris 8上运行一个简单的C ++程序,它可以分发和执行一堆
的进程。它已经运行好多年,但是现在我已经转移到了更快的硬件,我遇到了一个问题,即
更频繁地浮出水面因为我正在使用的硬件变得更好/更快

- 这似乎是某种竞争条件问题。


基本上,随机,a少数几个过程立即失败

(在实际做任何事情之前)并返回退出代码4294967295

(UINT_MAX)。我想这只是一个伞状态代码

所有意外/无法解释的错误,所以我不确定它是否意味着

什么?


有一点需要注意的是,如果我只是捕获此错误并再次执行

进程,它运行正常。看起来好像当时发生了b / b $ fork $ exec,系统中的某些东西暂时搞砸了b $ b但是我不知道是什么。当然我确实有一个解决方法(只需重新运行

的过程)但我想知道发生了什么。


如果有人这样的话,请告诉我,如果需要,我可以给你提供更多信息......谢谢。

解决方案



" Vineet" < 6 ************* @ mantas.com>在留言新闻中写道:4a ************************** @ posting.google.c om ...

:如果有人对这个问题有任何了解我会遇到这样的事情我会这么说:b $ b:非常感谢你能写信给我......



:我正在Solaris 8上运行一个简单的C ++程序,该程序分支和执行一个
:一堆进程。它已经运行好多年了,但是现在这已经转移到了更快的硬件,我遇到了一个问题

:表面更频繁,因为我正在使用的硬件变得更好/更快

: - 这似乎是某种竞争条件问题。


听起来像叉子失败了。如果程序没有以root用户身份运行,那么你可能超过了maxuproc(参见你的内核参数

文档)。如果它以root身份运行,则超出nprocs。

Nprocs确定控制进程的结构数量是多少
。 Maxuproc确定用户可以使用多少个进程 - 它应该总是少于半个nprocs,并且通常相当小一些b $ b。没有设置大多数机器的默认参数

以适应少数程序或用户的大量使用。


另一个问题,很可能是您没有正确处理等待情况

并且可能有大量的僵尸进程。这些

将消耗有限的流程资源。即使您的进程被初始化获得了,也可以进入竞争条件,其中创建zombie'的
的速度比init快得多。没有看到任何

实际代码 - 比如你的fork-exec代码 - 它是不可能的。


如果你想要更多帮助,可以发布一些代码。


祝你好运,


Dan




:基本上,随机,一小撮过程立即失败

:(在实际做任何事情之前)并返回退出代码4294967295

:(UINT_MAX)。我想这只是一个伞状态代码

:所有意外/无法解释的错误,所以我不确定它是否意味着

:什么?


这是-1。




:有一点需要注意的是,如果我只是陷阱这个错误再次执行

:进程,运行正常。看起来好像当时发生了一个/ b
:fork / exec,系统中的某些东西暂时搞砸了

:但我不知道是什么。当然我确实有一个解决方法(只需重新运行

:过程)但我想知道发生了什么。



:如果有人装了这样的东西,请让我知道,我需要b $ b:如果需要,可以为你提供更多信息......谢谢。


vi ************ *@mantas.com (Vineet)写道:

如果有人对这个问题有任何见解我正在遇到我
非常感谢你们可以写信给我......

我正在Solaris 8上运行一个简单的C ++程序,它可以分发和执行一系列进程。多年来一直运行良好,但现在我已经转向更快的硬件,我遇到了一个问题,因为我正在使用的硬件更频繁地出现问题变得更好/更快
- 这似乎是某种竞争条件问题。

基本上,随机,一小撮过程立即失败
(在实际做任何事情之前)并返回退出代码
4294967295(UINT_MAX)。我想这只是一个伞状态代码,用于所有意外/无法解释的错误,所以我不确定
是否意味着什么?




那是-1,如果出现

错误,那么man页面会记录fork()返回。在这种情况下,您应该检查errno

的值是多少。您可以通过调用

perror()或strerror(errno)来获取错误的文本版本。这可能会启发一些事情。


Joe

-

不知道为什么美国是土地的人们在竞选期间,承诺应该在这里



- Milton Berle



如果你想要更多的帮助,可以发布一些代码。




真的,伙计们,这个讨论属于离线或者更多的论坛/>
合适。这个新闻组没有讨论平台特定的东西,比如

进程/线程等。这是一个语言新闻组。


-Howard


If anybody has any insight into this problem I''m running into I would
really appreciate if you could write to me...

I''m running a simple C++ program on Solaris 8 that forks and execs a
bunch of processes. It''s been running fine for years, but now that
I''ve moved to faster hardware, I''m running into a problem that
surfaces more frequently as the hardware I''m using gets better/faster
-- it seems like some sort of race condition issue.

Basically, at random, a handful of the process immediately fail
(before actually doing anything) and return an exit code of 4294967295
(UINT_MAX). I imagine that this is just an umbrella status code for
all unexpected/unexplained errors, so I''m not sure if it means
anything?

One thing to note is that if I just trap this error and execute the
process again, it runs fine. It just seems like at the time the
fork/exec takes place, something in the system temporarily screws up
but I don''t know what. Of course I do have a workaround (just re-run
the process) but I''d like to know what''s going on.

If anybody has encounted anything like this, please let me know, and I
can provide you with more information if need be...thanks.

解决方案


"Vineet" <vi*************@mantas.com> wrote in message news:4a**************************@posting.google.c om...
: If anybody has any insight into this problem I''m running into I would
: really appreciate if you could write to me...
:
: I''m running a simple C++ program on Solaris 8 that forks and execs a
: bunch of processes. It''s been running fine for years, but now that
: I''ve moved to faster hardware, I''m running into a problem that
: surfaces more frequently as the hardware I''m using gets better/faster
: -- it seems like some sort of race condition issue.

Sounds like fork is failing. If the program is not running as root,
you are probably exceeding maxuproc (see your kernel parameters
documentation). If it is running as root, you''re exceeding nprocs.
Nprocs determines how many structures controlling processes are
created. Maxuproc determines how many processes a user can
have - it should always be less than half nprocs and is usually quite
a bit smaller. Default parameters for most machines are not set up
properly to handle heavy usage by a small number of programs or users.

One other problem, it is likely that you are not handling wait situations
properly and may have a large number of zombie processes. These
will consume limited process resources. Even if your processes
are being reaped by init it''s possible to get in race conditions where zombie''s
are created faster than init can reap them. Without seeing any
actual code - like your fork-exec code - it''s impossible to say.

Post some code if you want more help.

Good luck,

Dan

:
: Basically, at random, a handful of the process immediately fail
: (before actually doing anything) and return an exit code of 4294967295
: (UINT_MAX). I imagine that this is just an umbrella status code for
: all unexpected/unexplained errors, so I''m not sure if it means
: anything?

It''s a -1.

:
: One thing to note is that if I just trap this error and execute the
: process again, it runs fine. It just seems like at the time the
: fork/exec takes place, something in the system temporarily screws up
: but I don''t know what. Of course I do have a workaround (just re-run
: the process) but I''d like to know what''s going on.
:
: If anybody has encounted anything like this, please let me know, and I
: can provide you with more information if need be...thanks.


vi*************@mantas.com (Vineet) writes:

If anybody has any insight into this problem I''m running into I
would really appreciate if you could write to me...

I''m running a simple C++ program on Solaris 8 that forks and execs a
bunch of processes. It''s been running fine for years, but now that
I''ve moved to faster hardware, I''m running into a problem that
surfaces more frequently as the hardware I''m using gets better/faster
-- it seems like some sort of race condition issue.

Basically, at random, a handful of the process immediately fail
(before actually doing anything) and return an exit code of
4294967295 (UINT_MAX). I imagine that this is just an umbrella
status code for all unexpected/unexplained errors, so I''m not sure
if it means anything?



That''s -1, which the man page documents fork() to return in case of an
error. In that case you should check to see what the value of errno
is. You can get a textual version of the error by calling either
perror() or strerror(errno). That will probably enlighten things.

Joe
--
Folks who don''t know why America is the Land of Promise should be here
during an election campaign.
-- Milton Berle



Post some code if you want more help.



Really, guys, this discussion belongs off-line or in a forum that is more
appropriate. This newsgroup doesn''t discuss platform-specific stuff like
processes/threads, etc. This is a language newsgroup.

-Howard


这篇关于返回代码4294967295(UINT_MAX)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆