OK, here's the whole session setup as advised.
[bwhite@localhost src]$ erl -boot start_sasl -mnesia debug verbose
Erlang (BEAM) emulator version 5.5.5 [source] [64-bit] [async-threads:
0] [hipe] [kernel-poll:false]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.33.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.34.0>},
{name,overload},
{mfa,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.32.0>},
{name,sasl_safe_sup},
{mfa,
{supervisor,
start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.35.0>},
{name,release_handler},
{mfa,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
application: sasl
started_at: nonode@nohost
Eshell V5.5.5 (abort with ^G)
1>
1> dbg:tracer (), dbg:p (all, [ call ]), dbg:tpl (tcbdbtab, dbg:fun2ms
(fun
1> (_) -> return_trace () end)).
{ok,[{matched,nonode@nohost,27},{saved,1}]}
2> tcerl:start ().
=PROGRESS REPORT==== 16-Jul-2008::13:28:10 ===
supervisor: {local,tcerlsup}
started: [{pid,<0.51.0>},
{name,tcbdbsrv},
{mfa,{tcbdbsrv,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
ok
=PROGRESS REPORT==== 16-Jul-2008::13:28:10 ===
application: tcerl
started_at: nonode@nohost
3> mnesia:start ().
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.58.0>},
{name,mnesia_event},
{mfa,{mnesia_sup,start_event,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_monitor starting: <0.60.0>
Mnesia(nonode@nohost): Mnesia debug level set to verbose
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.60.0>},
{name,mnesia_monitor},
{mfa,{mnesia_monitor,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_subscr starting: <0.61.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.61.0>},
{name,mnesia_subscr},
{mfa,{mnesia_subscr,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_locker starting: <0.62.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.62.0>},
{name,mnesia_locker},
{mfa,{mnesia_locker,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_recover starting: <0.63.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.63.0>},
{name,mnesia_recover},
{mfa,{mnesia_recover,start,[]}},
{restart_type,permanent},
{shutdown,180000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_tm starting: <0.64.0>
Mnesia(nonode@nohost): Schema initiated from: default
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.65.0>},
{name,timer_server},
{mfa,{timer,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.64.0>},
{name,mnesia_tm},
{mfa,{mnesia_tm,start,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.66.0>},
{name,mnesia_checkpoint_sup},
{mfa,{mnesia_checkpoint_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.67.0>},
{name,mnesia_snmp_sup},
{mfa,{mnesia_snmp_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
Mnesia(nonode@nohost): mnesia_controller starting: <0.68.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.68.0>},
{name,mnesia_controller},
{mfa,{mnesia_controller,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_late_loader starting: <0.69.0>
Mnesia(nonode@nohost): Intend to load tables: []
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.69.0>},
{name,mnesia_late_loader},
{mfa,{mnesia_late_loader,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.59.0>},
{name,mnesia_kernel_sup},
{mfa,{mnesia_kernel_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
ok
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
application: mnesia
started_at: nonode@nohost
Mnesia(nonode@nohost): Mnesia started, 0 seconds
4> mnesia:change_table_copy_type (schema, node (), disc_copies).
Mnesia(nonode@nohost): Create Directory "/usr/local/work/projects/
first_mnesia/src/Mnesia.nonode@nohost"
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.73.0>},
{name,disk_log_sup},
{mfa,{disk_log_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.74.0>},
{name,disk_log_server},
{mfa,{disk_log_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.77.0>},
{name,dets_sup},
{mfa,{dets_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.78.0>},
{name,dets},
{mfa,{dets_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
{atomic,ok}
5> mnesia:create_table (testtab, [ { type, { external, ordered_set,
tcbdbtab } }, { external_copies, [ node () ] }, { user_properties,
[ { deflate, true }, { bucket_array_size, 10000 } ] } ]).
(<0.60.0>) call tcbdbtab:create_table(testtab,{cstruct,testtab,
{external,ordered_set,tcbdbtab},
[],
[],
[],
[nonode@nohost],
0,
read_write,
[],
[],
false,
testtab,
[key,val],
[{bucket_array_size,10000},{deflate,true}],
[],
{{1216,182517,6509},nonode@nohost},
{{2,0},[]}})
(<0.60.0>) call tcbdbtab:create_table(testtab,{cstruct,testtab,
{external,ordered_set,tcbdbtab},
[],
[],
[],
[nonode@nohost],
0,
read_write,
[],
[],
false,
testtab,
[key,val],
[{bucket_array_size,10000},{deflate,true}],
[],
{{1216,182517,6509},nonode@nohost},
{{2,0},[]}},"testtab.tcb")
(<0.91.0>) call tcbdbtab:delete_table(testtab)
{aborted,{no_exists,{testtab,cstruct}}}(<0.91.0>) call
tcbdbtab:get_port(testtab)
Mnesia(nonode@nohost): <0.91.0> ([]) val(mnesia_gvar,
{testtab,tcbdb_port}) -> {badarg,
[{ets,
lookup_element,
[mnesia_gvar,
{testtab,
tcbdb_port},
2]},
{mnesia_lib,
val,
1},
{tcbdbtab,
get_port,
1},
{tcbdbtab,
delete_table,
1},
{mnesia_schema,
undo_prepare_commit,
2},
{mnesia_tm,
do_abort,
2},
{mnesia_tm,
multi_commit,
4},
{mnesia_tm,
apply_fun,
3}]} {no_exists,
{testtab,
tcbdb_port}}
6> Mnesia(nonode@nohost): <0.91.0> ([]) val(mnesia_gvar,
{testtab,cstruct}) -> {badarg,
[{ets,
lookup_element,
[mnesia_gvar,
{testtab,
cstruct},
2]},
{mnesia_lib,
val,
1},
{tcbdbtab,
get_port,
1},
{tcbdbtab,
delete_table,
1},
{mnesia_schema,
undo_prepare_commit,
2},
{mnesia_tm,
do_abort,
2},
{mnesia_tm,
multi_commit,
4},
{mnesia_tm,
apply_fun,
3}]} {no_exists,
{testtab,
cstruct}}
^C[bwhite@localhost src]$ erl -boot start_sasl -mnesia debug verbose
Erlang (BEAM) emulator version 5.5.5 [source] [64-bit] [async-threads:
0] [hipe] [kernel-poll:false]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.33.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.34.0>},
{name,overload},
{mfa,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.32.0>},
{name,sasl_safe_sup},
{mfa,
{supervisor,
start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.35.0>},
{name,release_handler},
{mfa,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:26:59 ===
application: sasl
started_at: nonode@nohost
Eshell V5.5.5 (abort with ^G)
1>
1> dbg:tracer (), dbg:p (all, [ call ]), dbg:tpl (tcbdbtab, dbg:fun2ms
(fun
1> (_) -> return_trace () end)).
{ok,[{matched,nonode@nohost,27},{saved,1}]}
2> tcerl:start ().
=PROGRESS REPORT==== 16-Jul-2008::13:28:10 ===
supervisor: {local,tcerlsup}
started: [{pid,<0.51.0>},
{name,tcbdbsrv},
{mfa,{tcbdbsrv,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
ok
=PROGRESS REPORT==== 16-Jul-2008::13:28:10 ===
application: tcerl
started_at: nonode@nohost
3> mnesia:start ().
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.58.0>},
{name,mnesia_event},
{mfa,{mnesia_sup,start_event,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_monitor starting: <0.60.0>
Mnesia(nonode@nohost): Mnesia debug level set to verbose
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.60.0>},
{name,mnesia_monitor},
{mfa,{mnesia_monitor,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_subscr starting: <0.61.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.61.0>},
{name,mnesia_subscr},
{mfa,{mnesia_subscr,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_locker starting: <0.62.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.62.0>},
{name,mnesia_locker},
{mfa,{mnesia_locker,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_recover starting: <0.63.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.63.0>},
{name,mnesia_recover},
{mfa,{mnesia_recover,start,[]}},
{restart_type,permanent},
{shutdown,180000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_tm starting: <0.64.0>
Mnesia(nonode@nohost): Schema initiated from: default
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.65.0>},
{name,timer_server},
{mfa,{timer,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.64.0>},
{name,mnesia_tm},
{mfa,{mnesia_tm,start,[]}},
{restart_type,permanent},
{shutdown,30000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.66.0>},
{name,mnesia_checkpoint_sup},
{mfa,{mnesia_checkpoint_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.67.0>},
{name,mnesia_snmp_sup},
{mfa,{mnesia_snmp_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
Mnesia(nonode@nohost): mnesia_controller starting: <0.68.0>
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.68.0>},
{name,mnesia_controller},
{mfa,{mnesia_controller,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
Mnesia(nonode@nohost): mnesia_late_loader starting: <0.69.0>
Mnesia(nonode@nohost): Intend to load tables: []
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_kernel_sup}
started: [{pid,<0.69.0>},
{name,mnesia_late_loader},
{mfa,{mnesia_late_loader,start,[]}},
{restart_type,permanent},
{shutdown,3000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
supervisor: {local,mnesia_sup}
started: [{pid,<0.59.0>},
{name,mnesia_kernel_sup},
{mfa,{mnesia_kernel_sup,start,[]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
ok
=PROGRESS REPORT==== 16-Jul-2008::13:28:18 ===
application: mnesia
started_at: nonode@nohost
Mnesia(nonode@nohost): Mnesia started, 0 seconds
4> mnesia:change_table_copy_type (schema, node (), disc_copies).
Mnesia(nonode@nohost): Create Directory "/usr/local/work/projects/
first_mnesia/src/Mnesia.nonode@nohost"
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.73.0>},
{name,disk_log_sup},
{mfa,{disk_log_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.74.0>},
{name,disk_log_server},
{mfa,{disk_log_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.77.0>},
{name,dets_sup},
{mfa,{dets_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,supervisor}]
=PROGRESS REPORT==== 16-Jul-2008::13:28:25 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.78.0>},
{name,dets},
{mfa,{dets_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
{atomic,ok}
5> mnesia:create_table (testtab, [ { type, { external, ordered_set,
tcbdbtab } }, { external_copies, [ node () ] }, { user_properties,
[ { deflate, true }, { bucket_array_size, 10000 } ] } ]).
(<0.60.0>) call tcbdbtab:create_table(testtab,{cstruct,testtab,
{external,ordered_set,tcbdbtab},
[],
[],
[],
[nonode@nohost],
0,
read_write,
[],
[],
false,
testtab,
[key,val],
[{bucket_array_size,10000},{deflate,true}],
[],
{{1216,182517,6509},nonode@nohost},
{{2,0},[]}})
(<0.60.0>) call tcbdbtab:create_table(testtab,{cstruct,testtab,
{external,ordered_set,tcbdbtab},
[],
[],
[],
[nonode@nohost],
0,
read_write,
[],
[],
false,
testtab,
[key,val],
[{bucket_array_size,10000},{deflate,true}],
[],
{{1216,182517,6509},nonode@nohost},
{{2,0},[]}},"testtab.tcb")
(<0.91.0>) call tcbdbtab:delete_table(testtab)
{aborted,{no_exists,{testtab,cstruct}}}(<0.91.0>) call
tcbdbtab:get_port(testtab)
Mnesia(nonode@nohost): <0.91.0> ([]) val(mnesia_gvar,
{testtab,tcbdb_port}) -> {badarg,
[{ets,
lookup_element,
[mnesia_gvar,
{testtab,
tcbdb_port},
2]},
{mnesia_lib,
val,
1},
{tcbdbtab,
get_port,
1},
{tcbdbtab,
delete_table,
1},
{mnesia_schema,
undo_prepare_commit,
2},
{mnesia_tm,
do_abort,
2},
{mnesia_tm,
multi_commit,
4},
{mnesia_tm,
apply_fun,
3}]} {no_exists,
{testtab,
tcbdb_port}}
6> Mnesia(nonode@nohost): <0.91.0> ([]) val(mnesia_gvar,
{testtab,cstruct}) -> {badarg,
[{ets,
lookup_element,
[mnesia_gvar,
{testtab,
cstruct},
2]},
{mnesia_lib,
val,
1},
{tcbdbtab,
get_port,
1},
{tcbdbtab,
delete_table,
1},
{mnesia_schema,
undo_prepare_commit,
2},
{mnesia_tm,
do_abort,
2},
{mnesia_tm,
multi_commit,
4},
{mnesia_tm,
apply_fun,
3}]} {no_exists,
{testtab,
cstruct}}
<-- RESULTS NO testtab.tcp -->
[bwhite@localhost Mnesia.nonode@nohost]$ ls -ltr
total 20
-rw-rw-r-- 1 bwhite bwhite 8328 2008-07-16 13:28 schema.DAT
-rw-rw-r-- 1 bwhite bwhite 95 2008-07-16 13:28 LATEST.LOG
-rw-rw-r-- 1 bwhite bwhite 156 2008-07-16 13:28 DECISION_TAB.LOG
Interestingly, if I pull out the create_table/3 function to a separate
file and run it, it does result in the creation of testtab.tcb. So
that means the trouble is after that?
% from tcbdbtab.erl
create_table (Tab, Cs, FileName) ->
Dir = mnesia_lib:val (dir),
{ _, Type, _ } = Cs#cstruct.type,
UserProps = [ case X of { Foo, true } when Foo =:= uncompressed
orelse
Foo =:= deflate orelse
Foo =:= tcbs -> Foo;
_ -> X
end || X <- Cs#cstruct.user_properties ],
File = filename:join ([ Dir, FileName ]),
{ ok, Port } = tcbdbets:open_file ([ { access, read_write },
{ file, File },
{ keypos, 2 },
{ type, Type } ]
++ UserProps),
tcbdbets:unlink (Port),
mnesia_lib:set ({ Tab, tcbdb_port }, Port),
Tab.
do_test()->
create_table(testtab,{cstruct,testtab,
{external,ordered_set,tcbdbtab},
[],
[],
[],
[nonode@nohost],
0,
read_write,
[],
[],
false,
testtab,
[key,val],
[{bucket_array_size,10000},{deflate,true}],
[],
{{1216,180226,830519},nonode@nohost},
{{2,0},[]}},"testtab.tcb").
Regards,
Bruce