Changeset: e0462c692845 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e0462c692845
Modified Files:
        MonetDB4/src/monet/Tests/modrefcnt1.stable.out
        MonetDB4/src/monet/Tests/modrefcnt2-is.stable.err
        MonetDB4/src/monet/Tests/modrefcnt2-is.stable.out
        MonetDB4/src/monet/Tests/modrefcnt2.stable.err
        MonetDB4/src/monet/Tests/modrefcnt2.stable.out
        MonetDB4/src/monet/monet_tbl.mx
        MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/All
        
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.milS
        
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.prelude
        
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.err
        
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.out
        
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.out.STATIC
Branch: Oct2010
Log Message:

Refuse to unload a (M4) module if there are *any* references to types.
Before, a module unload would succeed even if there were MIL variables
that reference BATs that use a type from the module since only the
logical reference count was > 0.  However, we would then get a
deadlock when trying to use that MIL variable in e.g. a print.
Hence the timeout to the modrefcnt1 test.
This commit changes the behavior by not allowing the unload, and hence
changes the output of the test.

Also removed test double_load_double_drop.SF-1082293 since it is a
duplicate of modrefcnt1.


diffs (truncated from 339 to 300 lines):

diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/src/monet/Tests/modrefcnt1.stable.out
--- a/MonetDB4/src/monet/Tests/modrefcnt1.stable.out    Thu Sep 23 08:25:33 
2010 +0200
+++ b/MonetDB4/src/monet/Tests/modrefcnt1.stable.out    Thu Sep 23 10:42:59 
2010 +0200
@@ -58,10 +58,12 @@
 [ 0 ]
 
 drop("lock");
+!ERROR: unloadmod_check_use: drop(_lock) failed: tmp_32[int,lock] has 1 
reference.
 loaded();
 #---------------------------------#
 # module       | usage_count     #
 #---------------------------------#
+[ "_lock",       1               ]
 [ "algebra",     1               ]
 [ "arith",       1               ]
 [ "bat",         1               ]
@@ -72,10 +74,12 @@
 [ "sys",         1               ]
 [ "trans",       1               ]
 test.print();
-!ERROR: DESCload: atom 'lock' unknown, in BAT '32'.
+#-----------------#
+# h    t         # name
+# int  lock      # type
+#-----------------#
 test.count().print();
-!ERROR: DESCload: atom 'lock' unknown, in BAT '32'.
-!ERROR: interpret_params: print(param 1): evaluation error.
+[ 0 ]
 
 quit();
 
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/src/monet/Tests/modrefcnt2-is.stable.err
--- a/MonetDB4/src/monet/Tests/modrefcnt2-is.stable.err Thu Sep 23 08:25:33 
2010 +0200
+++ b/MonetDB4/src/monet/Tests/modrefcnt2-is.stable.err Thu Sep 23 10:42:59 
2010 +0200
@@ -10,10 +10,10 @@
 # 15:28:40 >  Mtimeout -timeout 60 MapiClient 
"--config=/ufs/boncz/MonetDB/linux/etc/monet.conf" --host=octans --port=55437 < 
modrefcnt2_s00.milC
 # 15:28:40 >  
 
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'print(BAT[int,lock])' 
with illegal types.
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").count().print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'count(BAT[int,lock])' 
with illegal types.
         !ERROR: interpret_params: print(param 1): evaluation error.
@@ -27,14 +27,14 @@
 # 15:49:28 >  Mtimeout -timeout 60 MapiClient -u monetdb -P monetdb 
"--config=/data/home/niels/data/PGI/etc/monet.conf" --host=spin --port=47322 < 
modrefcnt2-is_s02.milC
 # 15:49:28 >  
 
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'print(BAT[int,lock])' 
with illegal types.
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").count().print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'count(BAT[int,lock])' 
with illegal types.
         !ERROR: interpret_params: print(param 1): evaluation error.
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = drop("lock");
 ERROR = !ERROR: TBL_unloadmod: lock was not loaded.
 
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/src/monet/Tests/modrefcnt2-is.stable.out
--- a/MonetDB4/src/monet/Tests/modrefcnt2-is.stable.out Thu Sep 23 08:25:33 
2010 +0200
+++ b/MonetDB4/src/monet/Tests/modrefcnt2-is.stable.out Thu Sep 23 10:42:59 
2010 +0200
@@ -83,10 +83,12 @@
 [ 0 ]
 
 drop("lock");
+!ERROR: unloadmod_check_use: drop(_lock) failed: test[int,lock] has 1 
reference.
 loaded();
 #---------------------------------#
 # module       | usage_count     #
 #---------------------------------#
+[ "_lock",       1               ]
 [ "algebra",     1               ]
 [ "arith",       1               ]
 [ "bat",         1               ]
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/src/monet/Tests/modrefcnt2.stable.err
--- a/MonetDB4/src/monet/Tests/modrefcnt2.stable.err    Thu Sep 23 08:25:33 
2010 +0200
+++ b/MonetDB4/src/monet/Tests/modrefcnt2.stable.err    Thu Sep 23 10:42:59 
2010 +0200
@@ -10,10 +10,10 @@
 # 00:53:04 >  Mtimeout -timeout 60 MapiClient -u monetdb -P monetdb 
"--config=/var/tmp/monet.GNU_32-d.14598/MonetDB/Linux2.4.20-31.9smp/conf/MonetDB.conf"
 --host=draco --port=42778 < modrefcnt2_s00.milC
 # 00:53:04 >  
 
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'print(BAT[int,lock])' 
with illegal types.
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").count().print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'count(BAT[int,lock])' 
with illegal types.
         !ERROR: interpret_params: print(param 1): evaluation error.
@@ -27,14 +27,14 @@
 # 00:53:05 >  Mtimeout -timeout 60 MapiClient -u monetdb -P monetdb 
"--config=/var/tmp/monet.GNU_32-d.14598/MonetDB/Linux2.4.20-31.9smp/conf/MonetDB.conf"
 --host=draco --port=42778 < modrefcnt2_s02.milC
 # 00:53:05 >  
 
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'print(BAT[int,lock])' 
with illegal types.
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = bat("test").count().print();
 ERROR = !ERROR: interpret: MIL operator invocation of 'count(BAT[int,lock])' 
with illegal types.
         !ERROR: interpret_params: print(param 1): evaluation error.
-MAPI  = mone...@localhost:30185
+MAPI  = mone...@ottar:35656
 QUERY = drop("lock");
 ERROR = !ERROR: TBL_unloadmod: lock was not loaded.
 
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/src/monet/Tests/modrefcnt2.stable.out
--- a/MonetDB4/src/monet/Tests/modrefcnt2.stable.out    Thu Sep 23 08:25:33 
2010 +0200
+++ b/MonetDB4/src/monet/Tests/modrefcnt2.stable.out    Thu Sep 23 10:42:59 
2010 +0200
@@ -83,10 +83,12 @@
 [ 0 ]
 
 drop("lock");
+!ERROR: unloadmod_check_use: drop(_lock) failed: test[int,lock] has 1 
reference.
 loaded();
 #---------------------------------#
 # module       | usage_count     #
 #---------------------------------#
+[ "_lock",       1               ]
 [ "algebra",     1               ]
 [ "arith",       1               ]
 [ "bat",         1               ]
diff -r 03a01f0eef49 -r e0462c692845 MonetDB4/src/monet/monet_tbl.mx
--- a/MonetDB4/src/monet/monet_tbl.mx   Thu Sep 23 08:25:33 2010 +0200
+++ b/MonetDB4/src/monet/monet_tbl.mx   Thu Sep 23 10:42:59 2010 +0200
@@ -1904,7 +1904,7 @@
 unloadmod_bat(BAT *b, oid mid)
 {
        int yy = 0;
-       int refs = BBP_refs(b->batCacheid);
+       int refs = BBP_refs(b->batCacheid) + BBP_lrefs(b->batCacheid);
 
        if (refs > 0) {
                BUN p, q;
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/All
--- a/MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/All  Thu Sep 23 08:25:33 
2010 +0200
+++ b/MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/All  Thu Sep 23 10:42:59 
2010 +0200
@@ -8,4 +8,3 @@
 tcpip_rpc_crash_bat.SF-1049942
 append_bat_bat.SF-1054499
 tcpip_hangs_on_close.SF-1070569
-double_load_double_drop.SF-1082293
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.prelude
--- 
a/MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.prelude
   Thu Sep 23 08:25:33 2010 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# this is a copy of ../../../src/monet/Tests/modrefcnt1.milM (with
-# this comment added ;-)
-module("lock");
-module("lock");
-
-VAR test := new(int,lock);
-loaded();
-test.print();
-test.count().print();
-
-drop("lock");
-loaded();
-test.print();
-test.count().print();
-
-drop("lock");
-loaded();
-test.print();
-test.count().print();
-
-quit();
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.err
--- 
a/MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.err
        Thu Sep 23 08:25:33 2010 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-stderr of test 'double_load_double_drop.SF-1082293` in directory 
'tests/BugDay_2005-11-09_4.9.3` itself:
-
-
-# 13:07:29 >  
-# 13:07:29 >  Mtimeout -timeout 60 Mserver 
"--config=/home/sjoerd/etc/MonetDB.conf" --debug=10 --set 
"monet_mod_path=/home/sjoerd/lib/MonetDB:/home/sjoerd/lib/bin" --set 
"gdk_dbfarm=/home/sjoerd/var/MonetDB/dbfarm" --set 
"sql_logdir=/home/sjoerd/var/MonetDB/log" --set mapi_port=37588 --set 
sql_port=42211 --set xquery_port=51866 --set monet_prompt= --trace 
--dbname=mTests_tests_BugDay_2005-11-09_4.9.3 
double_load_double_drop.SF-1082293.prelude < 
double_load_double_drop.SF-1082293.milM
-# 13:07:29 >  
-
-
-# 13:07:29 >  
-# 13:07:29 >  Done.
-# 13:07:29 >  
-
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.out
--- 
a/MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.out
        Thu Sep 23 08:25:33 2010 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-stdout of test 'double_load_double_drop.SF-1082293` in directory 
'tests/BugDay_2005-11-09_4.9.3` itself:
-
-
-# 13:07:29 >  
-# 13:07:29 >  Mtimeout -timeout 60 Mserver 
"--config=/home/sjoerd/etc/MonetDB.conf" --debug=10 --set 
"monet_mod_path=/home/sjoerd/lib/MonetDB:/home/sjoerd/lib/bin" --set 
"gdk_dbfarm=/home/sjoerd/var/MonetDB/dbfarm" --set 
"sql_logdir=/home/sjoerd/var/MonetDB/log" --set mapi_port=37588 --set 
sql_port=42211 --set xquery_port=51866 --set monet_prompt= --trace 
--dbname=mTests_tests_BugDay_2005-11-09_4.9.3 
double_load_double_drop.SF-1082293.prelude < 
double_load_double_drop.SF-1082293.milM
-# 13:07:29 >  
-
-# Monet Database Server V4.9.3
-# Copyright (c) 1993-2005, CWI. All rights reserved.
-# Compiled for i686-redhat-linux-gnu/32bit with 32bit OIDs; dynamically linked.
-# Visit http://monetdb.cwi.nl/ for further information.
-#---------------------------------#
-# module               usage_count       # name
-# str          int               # type
-#---------------------------------#
-[ "algebra",     1               ]
-[ "arith",       1               ]
-[ "bat",         1               ]
-[ "builtin",     1               ]
-[ "constant",    1               ]
-[ "lock",        2               ]
-[ "main",        1               ]
-[ "str",         1               ]
-[ "sys",         1               ]
-[ "trans",       1               ]
-#-----------------#
-# h    t         # name
-# int  lock      # type
-#-----------------#
-[ 0 ]
-#---------------------------------#
-# module               usage_count       # name
-# str          int               # type
-#---------------------------------#
-[ "algebra",     1               ]
-[ "arith",       1               ]
-[ "bat",         1               ]
-[ "builtin",     1               ]
-[ "constant",    1               ]
-[ "lock",        1               ]
-[ "main",        1               ]
-[ "str",         1               ]
-[ "sys",         1               ]
-[ "trans",       1               ]
-#-----------------#
-# h    t         # name
-# int  lock      # type
-#-----------------#
-[ 0 ]
-#---------------------------------#
-# module               usage_count       # name
-# str          int               # type
-#---------------------------------#
-[ "algebra",     1               ]
-[ "arith",       1               ]
-[ "bat",         1               ]
-[ "builtin",     1               ]
-[ "constant",    1               ]
-[ "main",        1               ]
-[ "str",         1               ]
-[ "sys",         1               ]
-[ "trans",       1               ]
-!ERROR: DESCload: atom 'lock' unknown, in BAT '32'.
-quit();
-
-# 13:07:29 >  
-# 13:07:29 >  Done.
-# 13:07:29 >  
-
diff -r 03a01f0eef49 -r e0462c692845 
MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.out.STATIC
--- 
a/MonetDB4/tests/BugDay_2005-11-09_4.9.3/Tests/double_load_double_drop.SF-1082293.stable.out.STATIC
 Thu Sep 23 08:25:33 2010 +0200
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-stdout of test 'double_load_double_drop.SF-1082293` in directory 
'tests/BugDay_2005-11-09_4.9.3` itself:
-
-
-# 13:07:29 >  
-# 13:07:29 >  Mtimeout -timeout 60 Mserver 
"--config=/home/sjoerd/etc/MonetDB.conf" --debug=10 --set 
"monet_mod_path=/home/sjoerd/lib/MonetDB:/home/sjoerd/lib/bin" --set 
"gdk_dbfarm=/home/sjoerd/var/MonetDB/dbfarm" --set 
"sql_logdir=/home/sjoerd/var/MonetDB/log" --set mapi_port=37588 --set 
sql_port=42211 --set xquery_port=51866 --set monet_prompt= --trace 
--dbname=mTests_tests_BugDay_2005-11-09_4.9.3 
double_load_double_drop.SF-1082293.prelude < 
double_load_double_drop.SF-1082293.milM
-# 13:07:29 >  
-
-# Monet Database Server V4.9.3
-# Copyright (c) 1993-2005, CWI. All rights reserved.
-# Compiled for i686-redhat-linux-gnu/32bit with 32bit OIDs; dynamically linked.
-# Visit http://monetdb.cwi.nl/ for further information.
-#---------------------------------#
-# module               usage_count       # name
-# str          int               # type
-#---------------------------------#
-[ "algebra",     1               ]
-[ "arith",       1               ]
-[ "bat",         1               ]
-[ "builtin",     1               ]
-[ "constant",    1               ]
-[ "lock",        2               ]
-[ "main",        1               ]
-[ "str",         1               ]
-[ "sys",         1               ]
-[ "trans",       1               ]
-#-----------------#
-# h    t         # name
-# int  lock      # type
-#-----------------#
-[ 0 ]
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to