Hello community,
here is the log from the commit of package icecream
checked in at Tue Sep 12 11:39:17 CEST 2006.
--------
--- icecream/icecream.changes 2006-09-06 14:43:26.000000000 +0200
+++ icecream/icecream.changes 2006-09-12 07:29:43.000000000 +0200
@@ -1,0 +2,19 @@
+Tue Sep 12 07:29:37 CEST 2006 - coolo@suse.de
+
+- 0.7.13:
+ - use file -L to follow symlinks in create-env
+ - fix an easy valgrind error
+ - make handling of the return values consistent
+ - if the client is in WAITCOMPILE then it's waiting for some
+ other host to compile, not this one. So job == 0 -> crash
+ - fix crash if the scheduler goes away while daemon transfers
+ environment
+ - apparently sometimes gcc can hang forever in some
+ cases. By the time the client disconects, we know
+ we don't have to wait any longer, because there is
+ nobody left caring about the result.
+ - update node name each time we login to the scheduler.
+ Fixes tons of "linux" hosts appearing in the icecream
+ monitor
+
+-------------------------------------------------------------------
Old:
----
icecc-0.7.12.tar.bz2
New:
----
icecc-0.7.13.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ icecream.spec ++++++
--- /var/tmp/diff_new_pack.zV3lwQ/_old 2006-09-12 11:38:29.000000000 +0200
+++ /var/tmp/diff_new_pack.zV3lwQ/_new 2006-09-12 11:38:29.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package icecream (Version 0.7.12)
+# spec file for package icecream (Version 0.7.13)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -22,7 +22,7 @@
%endif
Prereq: /usr/sbin/useradd /usr/sbin/groupadd
Requires: gcc-c++
-Version: 0.7.12
+Version: 0.7.13
Release: 1
Source0: ftp://ftp.suse.com/pub/projects/icecream/icecc-%{version}.tar.bz2
Source1: %name-manpages.tar.bz2
@@ -139,6 +139,22 @@
%_libdir/pkgconfig/icecc.pc
%changelog -n icecream
+* Tue Sep 12 2006 - coolo@suse.de
+- 0.7.13:
+- use file -L to follow symlinks in create-env
+- fix an easy valgrind error
+- make handling of the return values consistent
+- if the client is in WAITCOMPILE then it's waiting for some
+ other host to compile, not this one. So job == 0 -> crash
+- fix crash if the scheduler goes away while daemon transfers
+ environment
+- apparently sometimes gcc can hang forever in some
+ cases. By the time the client disconects, we know
+ we don't have to wait any longer, because there is
+ nobody left caring about the result.
+- update node name each time we login to the scheduler.
+ Fixes tons of "linux" hosts appearing in the icecream
+ monitor
* Wed Sep 06 2006 - coolo@suse.de
- 0.7.12:
- fixing error handling when scheduler restarts
++++++ icecc-0.7.12.tar.bz2 -> icecc-0.7.13.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/NEWS new/icecream/NEWS
--- old/icecream/NEWS 2006-09-06 14:41:23.000000000 +0200
+++ new/icecream/NEWS 2006-09-12 07:22:52.000000000 +0200
@@ -1,3 +1,19 @@
+0.7.13 (583347):
+ - use file -L to follow symlinks in create-env
+ - fix an easy valgrind error
+ - make handling of the return values consistent
+ - if the client is in WAITCOMPILE then it's waiting for some
+ other host to compile, not this one. So job == 0 -> crash
+ - fix crash if the scheduler goes away while daemon transfers
+ environment
+ - apparently sometimes gcc can hang forever in some
+ cases. By the time the client disconects, we know
+ we don't have to wait any longer, because there is
+ nobody left caring about the result.
+ - update node name each time we login to the scheduler.
+ Fixes tons of "linux" hosts appearing in the icecream
+ monitor
+
0.7.12 (r581454):
- fixing error handling when scheduler restarts
- do not waitpid before we're sure we read all of g++'s
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/client/icecc-create-env new/icecream/client/icecc-create-env
--- old/icecream/client/icecc-create-env 2006-08-29 09:23:05.000000000 +0200
+++ new/icecream/client/icecc-create-env 2006-09-11 01:40:49.000000000 +0200
@@ -35,8 +35,8 @@
target_files="$target_files $toadd"
if test -x "$path"; then
# Only call ldd when it makes sense
- if file "$path" | grep 'ELF' > /dev/null 2>&1; then
- if ! file "$path" | grep 'static' > /dev/null 2>&1; then
+ if file -L "$path" | grep 'ELF' > /dev/null 2>&1; then
+ if ! file -L "$path" | grep 'static' > /dev/null 2>&1; then
# ldd now outputs ld as /lib/ld-linux.so.xx on current nptl based glibc
# this regexp parse the outputs like:
# ldd /usr/bin/gcc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/configure.in new/icecream/configure.in
--- old/icecream/configure.in 2006-09-06 14:41:23.000000000 +0200
+++ new/icecream/configure.in 2006-09-11 22:26:01.000000000 +0200
@@ -4,7 +4,7 @@
AC_INIT(client/main.cpp)
-AM_INIT_AUTOMAKE(icecc, "0.7.12")
+AM_INIT_AUTOMAKE(icecc, "0.7.13")
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/daemon/main.cpp new/icecream/daemon/main.cpp
--- old/icecream/daemon/main.cpp 2006-09-06 13:12:08.000000000 +0200
+++ new/icecream/daemon/main.cpp 2006-09-12 07:22:52.000000000 +0200
@@ -159,9 +159,13 @@
~Client()
{
+ status = (Status) -1;
delete channel;
+ channel = 0;
delete usecsmsg;
+ usecsmsg = 0;
delete job;
+ job = 0;
if (pipe_to_child >= 0)
close (pipe_to_child);
}
@@ -228,13 +232,12 @@
return 0;
}
- Client *take_first()
+ Client *first()
{
iterator it = begin();
if ( it == end() )
return 0;
Client *cl = it->second;
- erase( it );
return cl;
}
@@ -411,6 +414,7 @@
int listen_fd;
string machine_name;
string nodename;
+ bool custom_nodename;
size_t cache_size;
map fd2chan;
int new_client_id;
@@ -437,6 +441,7 @@
new_client_id = 0;
next_check = 0;
cache_size = 0;
+ custom_nodename = false;
icecream_load = 0;
icecream_usage.tv_sec = icecream_usage.tv_usec = 0;
current_load = - 1000;
@@ -448,7 +453,7 @@
bench_source = "";
}
- bool reannounce_environments(const string &envbasedir, const string &nodename) __attribute_warn_unused_result__;
+ bool reannounce_environments() __attribute_warn_unused_result__;
int answer_client_requests();
bool handle_transfer_env( MsgChannel *c, Msg *msg ) __attribute_warn_unused_result__;
bool handle_get_native_env( MsgChannel *c ) __attribute_warn_unused_result__;
@@ -488,7 +493,7 @@
return true;
}
-bool Daemon::reannounce_environments(const string &envbasedir, const string &nodename)
+bool Daemon::reannounce_environments()
{
LoginMsg lmsg( 0, nodename, "");
lmsg.envs = available_environmnents(envbasedir);
@@ -669,58 +674,61 @@
if ( maybe_stats(true) )
installed_size = install_environment( envbasedir, emsg->target,
emsg->name, c, nobody_uid, nobody_gid );
+ else
+ return false;
if (!installed_size) {
trace() << "install environment failed" << endl;
c->send_msg(EndMsg()); // shut up, we had an error
- reannounce_environments(envbasedir, nodename);
- } else {
- trace() << "envs " << dump_internals() << endl;
- cache_size += installed_size;
- string current = emsg->target + "/" + emsg->name;
- envs_last_use[current] = time( NULL );
- trace() << "installed " << emsg->name << " size: " << installed_size
- << " all: " << cache_size << endl;
-
- time_t now = time( NULL );
- while ( cache_size > cache_size_limit ) {
- string oldest;
- // I don't dare to use (time_t)-1
- time_t oldest_time = time( NULL ) + 90000;
- for ( map::const_iterator it = envs_last_use.begin();
- it != envs_last_use.end(); ++it ) {
- trace() << "das ist jetzt so: " << it->first << " " << it->second << " " << oldest_time << endl;
- // ignore recently used envs (they might be in use _right_ now)
- if ( it->second < oldest_time && now - it->second > 200 ) {
- bool found = false;
- for (Clients::const_iterator it2 = clients.begin(); it2 != clients.end(); ++it2) {
- if (it2->second->status == Client::WAITCOMPILE ||
+ return reannounce_environments();
+ }
+ trace() << "envs " << dump_internals() << endl;
+ cache_size += installed_size;
+ string current = emsg->target + "/" + emsg->name;
+ envs_last_use[current] = time( NULL );
+ trace() << "installed " << emsg->name << " size: " << installed_size
+ << " all: " << cache_size << endl;
+
+ time_t now = time( NULL );
+ while ( cache_size > cache_size_limit ) {
+ string oldest;
+ // I don't dare to use (time_t)-1
+ time_t oldest_time = time( NULL ) + 90000;
+ for ( map::const_iterator it = envs_last_use.begin();
+ it != envs_last_use.end(); ++it ) {
+ trace() << "das ist jetzt so: " << it->first << " " << it->second << " " << oldest_time << endl;
+ // ignore recently used envs (they might be in use _right_ now)
+ if ( it->second < oldest_time && now - it->second > 200 ) {
+ bool found = false;
+ for (Clients::const_iterator it2 = clients.begin(); it2 != clients.end(); ++it2) {
+ if (it2->second->status == Client::TOCOMPILE ||
it2->second->status == Client::WAITFORCHILD) {
- string envforjob = it2->second->job->targetPlatform() + "/"
- + it2->second->job->environmentVersion();
- if (envforjob == it->first)
- found = true;
- }
- }
- if (!found) {
- oldest_time = it->second;
- oldest = it->first;
+ assert( it2->second->job );
+ string envforjob = it2->second->job->targetPlatform() + "/"
+ + it2->second->job->environmentVersion();
+ if (envforjob == it->first)
+ found = true;
}
}
+ if (!found) {
+ oldest_time = it->second;
+ oldest = it->first;
+ }
}
- if ( oldest.empty() || oldest == current )
- break;
- size_t removed = remove_environment( envbasedir, oldest );
- trace() << "removing " << envbasedir << " " << oldest << " " << oldest_time << " " << removed << endl;
- cache_size -= min( removed, cache_size );
- envs_last_use.erase( oldest );
}
-
- reannounce_environments(envbasedir, nodename); // do that before the file compiles
+ if ( oldest.empty() || oldest == current )
+ break;
+ size_t removed = remove_environment( envbasedir, oldest );
+ trace() << "removing " << envbasedir << " " << oldest << " " << oldest_time << " " << removed << endl;
+ cache_size -= min( removed, cache_size );
+ envs_last_use.erase( oldest );
}
+
+ bool r = reannounce_environments(); // do that before the file compiles
// we do that here so we're not given out in case of full discs
- maybe_stats(true);
- return true;
+ if ( !maybe_stats(true) )
+ r = false;
+ return r;
}
bool Daemon::handle_get_native_env( MsgChannel *c )
@@ -882,10 +890,11 @@
bool Daemon::handle_compile_file( MsgChannel *c, Msg *msg )
{
CompileJob *job = dynamic_cast( msg )->takeJob();
- Client *cl = clients.find_by_channel( c );
- assert( cl );
- cl->job = job;
- if ( cl->status == Client::CLIENTWORK )
+ Client *client = clients.find_by_channel( c );
+ assert( client );
+ assert( job );
+ client->job = job;
+ if ( client->status == Client::CLIENTWORK )
{
assert( job->environmentVersion() == "__client" );
if ( !send_scheduler( JobBeginMsg( job->jobID() ) ) )
@@ -896,7 +905,7 @@
}
// no scheduler is not an error case!
} else
- cl->status = Client::TOCOMPILE;
+ client->status = Client::TOCOMPILE;
return true;
}
@@ -954,14 +963,21 @@
}
}
- clients.erase( client->channel );
+ if (!clients.erase( client->channel ))
+ {
+ log_error() << "client can't be erased: " << client->channel << endl;
+ flush_debug();
+ log_error() << dump_internals() << endl;
+ flush_debug();
+ assert(false);
+ }
delete client;
}
void Daemon::clear_children()
{
while ( !clients.empty() ) {
- Client *cl = clients.take_first();
+ Client *cl = clients.first();
handle_end( cl, 116 );
}
@@ -984,19 +1000,19 @@
bool Daemon::handle_get_cs( MsgChannel *c, Msg *msg )
{
GetCSMsg *umsg = dynamic_cast( msg );
- Client *cl = clients.find_by_channel( c );
- assert( cl );
- cl->status = Client::WAITFORCS;
- umsg->client_id = cl->client_id;
+ Client *client = clients.find_by_channel( c );
+ assert( client );
+ client->status = Client::WAITFORCS;
+ umsg->client_id = client->client_id;
trace() << "handle_get_cs " << umsg->client_id << endl;
if ( !scheduler )
{
/* now the thing is this: if there is no scheduler
there is no point in trying to ask him. So we just
redefine this as local job */
- cl->usecsmsg = new UseCSMsg( umsg->target, "127.0.0.1", PORT, umsg->client_id, true, 1 );
- cl->status = Client::PENDING_USE_CS;
- cl->job_id = umsg->client_id;
+ client->usecsmsg = new UseCSMsg( umsg->target, "127.0.0.1", PORT, umsg->client_id, true, 1 );
+ client->status = Client::PENDING_USE_CS;
+ client->job_id = umsg->client_id;
return true;
}
@@ -1015,10 +1031,10 @@
bool Daemon::handle_local_job( MsgChannel *c, Msg *msg )
{
trace() << "handle_local_job " << c << endl;
- Client *cl = clients.find_by_channel( c );
- assert( cl );
- cl->status = Client::LINKJOB;
- cl->outfile = dynamic_cast( msg )->outfile;
+ Client *client = clients.find_by_channel( c );
+ assert( client );
+ client->status = Client::LINKJOB;
+ client->outfile = dynamic_cast( msg )->outfile;
return true;
}
@@ -1197,7 +1213,16 @@
int i = it->first;
MsgChannel *c = it->second;
Client* client = clients.find_by_channel(c);
+ assert(client);
++it;
+ if (client->status == Client::WAITFORCHILD
+ && client->pipe_to_child != -1
+ && FD_ISSET(client->pipe_to_child, &listen_set) )
+ {
+ max_fd--;
+ if (!handle_compile_done(client))
+ return 1;
+ }
if (FD_ISSET (i, &listen_set)) {
c->read_a_bit();
while (c->has_msg()) {
@@ -1210,15 +1235,7 @@
}
max_fd--;
}
- if (client->status == Client::WAITFORCHILD
- && client->pipe_to_child != -1
- && FD_ISSET(client->pipe_to_child, &listen_set) )
- {
- max_fd--;
- if (!handle_compile_done(client))
- return 1;
- }
- }
+ }
}
}
return 0;
@@ -1258,7 +1275,11 @@
last_scheduler_ping = last_stat.tv_sec;
icecream_load = 0;
- trace() << "login as " << machine_name << endl;
+ // perhaps our host name changed due to network change?
+ struct utsname uname_buf;
+ if ( !custom_nodename && !uname( &uname_buf ) )
+ nodename = uname_buf.nodename;
+
LoginMsg lmsg( PORT, nodename, machine_name );
lmsg.envs = available_environmnents(envbasedir);
lmsg.max_kids = max_kids;
@@ -1432,7 +1453,9 @@
return 1;
}
- if ( !d.nodename.length() )
+ if ( d.nodename.length() && d.nodename != uname_buf.nodename )
+ d.custom_nodename = true;
+ if (!d.custom_nodename)
d.nodename = uname_buf.nodename;
d.machine_name = uname_buf.machine;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/daemon/serve.cpp new/icecream/daemon/serve.cpp
--- old/icecream/daemon/serve.cpp 2006-09-04 13:58:53.000000000 +0200
+++ new/icecream/daemon/serve.cpp 2006-09-11 21:58:59.000000000 +0200
@@ -197,7 +197,7 @@
job_stat[JobStatistics::out_uncompressed] = st.st_size;
/* wake up parent and tell him that compile finished */
- write( out_fd, job_stat, sizeof( job_stat ) );
+ send( out_fd, job_stat, sizeof( job_stat ), MSG_NOSIGNAL );
close( out_fd );
if ( rmsg.status == 0 ) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/daemon/workit.cpp new/icecream/daemon/workit.cpp
--- old/icecream/daemon/workit.cpp 2006-09-06 12:10:53.000000000 +0200
+++ new/icecream/daemon/workit.cpp 2006-09-12 07:22:52.000000000 +0200
@@ -438,6 +438,7 @@
if ( client_fd >= 0 && FD_ISSET( client_fd, &rfds ) ) {
rmsg.err.append( "client cancelled\n" );
client_fd = -1;
+ kill(pid, SIGTERM);
return_value = EXIT_CLIENT_KILLED;
}
// fall through
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/icecream/services/scheduler.cpp new/icecream/services/scheduler.cpp
--- old/icecream/services/scheduler.cpp 2006-09-05 09:57:30.000000000 +0200
+++ new/icecream/services/scheduler.cpp 2006-09-11 08:07:56.000000000 +0200
@@ -1534,9 +1534,7 @@
}
else if (toremove->type == CS::DAEMON)
{
-#if DEBUG_SCHEDULER > 0
- trace() << "remove daemon" << endl;
-#endif
+ log_info() << "remove daemon " << toremove->nodename << endl;
notify_monitors( MonStatsMsg( toremove->hostid, "State:Offline\n" ) );
++++++ icecream-manpages.tar.bz2 ++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org