-
neirac
I'm trying to print sd_ssc_t using dtrace but I'm just getting struct sd_ssc_t <forward decl> printed, what I'm missing ? dtrace -x switchrate=1000hz -q -n 'fbt:sd:sd_tg_rdwr:entry { print(*(struct sd_ssc_t *)args[0]); ustack();}' -c 'fdisk /dev/rdsk/c1t0d1p0'
-
jbk
no struct
-
jbk
(just use 'sd_ssc_t')
-
jbk
however.. sd_tg_rdwr passes in a dev_info_t for it's first argument
-
jbk
so not sure that'll do what you're wanting
-
neirac
-
neirac
jbk thanks that worked ! dtrace -x switchrate=1000hz -q -n 'fbt:sd:sd_send_scsi_READ_CAPACITY:entry { print(*(sd_ssc_t *)args[0]); ustack();}' -c 'fdisk /dev/rdsk/c1t0d1p0'
-
neirac
jbk I wanted to print ssc_un from that struct
-
neirac
I don't know if this is correct dtrace -x switchrate=1000hz -q -n 'fbt:sd:sd_send_scsi_READ_CAPACITY:entry { prii
-
neirac
nt(*(struct sd_lun *)args[0]->ssc_un); }' -c 'fdisk /dev/rdsk/c1t0d1p0'
-
jbk
args[nn] should have the type already
-
jbk
arg0, arg1, don't (or are actually int64_t IIRC)
-
neirac
jbk thanks!
-
neirac
jbk I'm still trying to find out why the scsi disk in oci is not able to be formatted, this the state when trying to fdisk it
termbin.com/whq99
-
jbk
there is also that mdb module.. disk_label i think..
-
tsoome
disk_label is just helping you to read and check MBR/VTOC and GPT.
-
tomww
<
-
jbk
heh.. this is a fun one.. I need to flush out the details of what's happening but with the right sequence of dladm commands, you can create schrödinger's aggr that both exists and doesn't exist
-
igork1
hi all, i hit very strange panic on old supermicro x8 with dual xeon:
-
igork1
-
igork1
ideas what can be related and how to try to fix it ?
-
sommerfeld
igork1: on my systems, unix:smt_init+a9 is just after a call to smt_find_sibling(). the crash looks very early as its trying to spin up all the threads on all the cores.
-
igork
sommerfeld: how to try to fix it ?
-
igork
ideas?
-
rmustacc
Focus on understanding what's wrong.
-
sommerfeld
you're getting way ahead of yourself. no idea what's actually wrong yet, so no way yet to know what to fix.
-
igork
rmustacc: i try. i'll try clear bios to default
-
igork
probably it's broken hw, but i have no direct access, just remote and very slow
-
rmustacc
why?
-
rmustacc
I mean, that's not understanding the problem.
-
rmustacc
Understand why we panicked, what was it that's wrong.
-
igork
ok, i'll try
-
tsoome
btw, does anyone have emulex fc hba (emlxs), need to get
code.illumos.org/c/illumos-gate/+/1942 tested...
-
fenix
→ CODE REVIEW 1942: 14394 emlxs: array subscript is partly outside array bounds (NEW) |
illumos.org/issues/14394
-
neirac
jbk is it too bad that vioscsi_tran_getcap returns -1 on geometry ?
-
gitomat
[illumos-gate] 15541 wrong pointer passed to ddi_soft_state_fini() in dam_map_alloc() -- Hans Rosenfeld <rosenfeld⊙gho>
-
jbk
neirac: probably? I've not looked at the vioscsi driver in a while, but sounds less than desirable
-
jbk
though looking at the function, 'cap' there is i think short for 'capability' and not 'capacity'
-
jbk
i guess it depends on what capability is being queried
-
neirac
yes, is capability, the requested capability is geometry and that one fails.
-
neirac
I'll fix that to see how far it goes, but I already tried hardcoding hte geometry in sd, at least I'm learning
-
jbk
also.. this bespoke persistent database code for dlmgmtd is annoying...
-
jbk
(and tedious)
-
richlowe
the choices there are all pretty bad.
-
richlowe
which isn't to defend it, I'm not keen on it either, but I'd also not be keen on any of the other options that spring to mind.
-
richlowe
SMF has shown us that sqlite isn't a good idea
-
richlowe
because there's absolutely no upgrade path.
-
richlowe
(you have to dump with the old sqlite and restore with the new. which obviously we can't arrange for in any realistic sense)
-
richlowe
I guess marshalled nvlists? especially if marshalled to something readably textual.
-
richlowe
(which I don't think we do bidirectionally at present)
-
sommerfeld
well, ancient sqlite isn't a good idea.
-
sommerfeld
sqlite 3.0.0 was released in 2004; we're on a 2.x version of sqlite
-
richlowe
right, the thing I said above is _why_ we're on 2.x
-
richlowe
we would have to arrange to use 3, ship something that we can get configd to run when it starts ('cos it needs to be linked with 2) to dump the DB and let configd load it back in.
-
richlowe
as the 3rd process we run, foolproofly. I don't think anyone has wanted to tackle it.
-
richlowe
(or you could have init do it before it starts configd, etc, my point is very early and with high stakes)
-
sommerfeld
or linker magic to let both versions coexist in the same namespace
-
richlowe
well, yeah, you could put them on different link maps, but that makes it more exciting :)
-
sommerfeld
s/namespace/address space/
-
sommerfeld
the underlying code in svc.configd already plays database-swapping games to cope with the filesystem potentially being read-only early in boot.
-
richlowe
if this is you volunteering, I would be _incredibly_ happy :)
-
sommerfeld
actually, there's another time you can do the conversion: before reboot into a new BE.
-
sommerfeld
ship two versions of svc.configd - one linked against sqlite2, one against sqlite3
-
sommerfeld
startd looks for some semaphore file to indicate conversion has happened
-
sommerfeld
picks the version of svc.configd that matches
-
sommerfeld
beadm or some such grows a command that will do the db dump/reload and create the semaphore file if successful.
-
sommerfeld
then you can do the conversion with a fully functional OS rather than one that has just woken up and is still groggy.
-
sommerfeld
you don't convert the running repo, you convert the quiescent one in the other BE
-
igork
richlowe: about squlite 2 - it can be converted to 3 by upgrade procedure, not on fly. you can move db to temporary one and convert to original by postinst procedure to additional BE
-
sommerfeld
igork: that's not the hard part
-
igork
sommerfeld: sure
-
igork
because we save smf db in every BE
-
sommerfeld
the tricky part is building the rest of the system to make that upgrade happen at a time when it is unlikely to fail, and make it so that a failed upgrade can be tried later.
-
sommerfeld
and pkg doesn't have postinstall scripts.
-
jbk
i haven't looked at any deps for sqllite3, but 2 looks like it just depends on libc.. so.. in the 'any problem can be solved with another layer of abstraction' vein, could check the version and dlopen() the correct sqllite library
-
jbk
it looks like for svc.configd that the sqlite stuff is confined to backend.c
-
jbk
(from first glance)
-
jbk
so as long as the SQL syntax itself hasn't changed incompatibily (would need to check, but probably not likely)
-
jbk
so it could just use whatever version is there.. and defer upgrading to some other point later when the system is up
-
jbk
or maybe allow the operator to control when it switches
-
sommerfeld
did a spot check, .dump in sqlite of the repository.db into .sql syntax, and .read it into a sqlite3 database
-
sommerfeld
sqlite3 is similarly lean
-
sommerfeld
but I believe the API is slightly different.
-
sommerfeld
so some headstands in backend.c would be needed
-
sommerfeld
(BTW, for the system I tried, the repository.db file is half the size when created by sqlite3)
-
sommerfeld
a round-trip load and re-dump sqlite3 turned up a few quirks when I diffed the dump
-
sommerfeld
a few large integers turned into floats.
-
sommerfeld
ah, one large integer (18446744073709551615, perhaps better known as 0xffffffffffffffff) appeared a bunch of times
-
sommerfeld
sqlite3 interpreted it as 1.84467440737096e+19
-
sommerfeld
lots of integers ended up dumped back out as strings
-
sommerfeld
only diff is to rows of value_tbl