Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

see-stdioesock-serve failing when running subzero #226

Open
bosswissam opened this issue Aug 17, 2020 · 5 comments
Open

see-stdioesock-serve failing when running subzero #226

bosswissam opened this issue Aug 17, 2020 · 5 comments

Comments

@bosswissam
Copy link

bosswissam commented Aug 17, 2020

@alokmenghrajani any idea what would be causing this?

cc @lacombar

% /opt/nfast/bin/see-stdioesock-serv --machine subzero-unsigned.ar --userdata-raw userdata.cpio --trace
nC SEE bsdlib machine booting
AF_UNIX bound to hardserver emulation.
Hardserver IO thread started.
AF_UNIX using hardserver emulation for /opt/nfast/sockets/nserver
/proc mounted.
SEE job device IO thread started.
bsdsee nshield (12.63.0-63-43553d3)
ncseevfs_hostcall_open( "/dev/seejobs/6e432f48432f7374646f6520", ... )
setup provision /dev/seejobs/6e432f48432f7374646f6520 hostcall
:outstand_want = 4
:outstand_max = 8
allocate 100 spare tags
spare tags ready
provision /dev/seejobs/6e432f48432f7374646f6520 hostcall ready
/dev/seejobs/ job with unhandled prefix
 !!jobs=1 0ctrl [6e432f48432f7374646f6520]
 job starts [6e432f48432f737464696f65]...
*** abort() called
@alokmenghrajani
Copy link
Contributor

Are you using the USB-PCI adapter?

@alokmenghrajani
Copy link
Contributor

Also, are you able to start/test any of the other sample apps provided by nCipher? This seems to be failing super early (probably before any of our code gets called).

@alokmenghrajani
Copy link
Contributor

Did you figure this out?

@lacombar
Copy link

lacombar commented Aug 21, 2020

Short story: Yes, we did.

Long story: The problem lied with the newer version of the HSM/CodeSafe SDK we are using. They added a compile-time plugin system which enables features on a need-to basis. Compile-time features are expected to match against a specific runtime environment. Features combinations are socket-only, std{out,err}, std{in,out,err} or std{in,out,err}+socket. We were linking against the std{out,err} library (as the provided examples all do!) and tried to run against the std{in,out,err}+socket environment, thus the failure. Figuring out the right library to use was a bit tricky as it is burried in the SDK subdirectories :-)

Also, in the std{out,err} environment, calls to socket(2) would completely fail. Linking against the right library fixed the socket initialization issues we were facing in my original port.

@alokmenghrajani
Copy link
Contributor

It is a known issue that 12.63.0 and newer don't work. As a result (and it's in the docs), we are using CodeSafe-linux64-dev-12.50.2.iso and firmware 12.50.11.

If you got things running on a newer SDK, we would appreciate if you could share any changes you made. This might even allow is to make a release sooner than planned (https://subzero.readthedocs.io/en/master/releases/ lists 2020Q4 as our next planned release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants