flat assembler
Message board for the users of flat assembler.

Index > Windows > Process monitor and strace question?

Author
Thread Post new topic Reply to topic
phpdevpad



Joined: 12 Jan 2013
Posts: 37
phpdevpad 20 Feb 2013, 18:48
In Windows in need sometimes process monitor for example the check for disk access. Recently I have a problem in Linux with chromium not loading nss libraries. I don't know much about Linux but I use strace on chromium. However it doesn't solve the problem but is there a Linux binary similar to process monitor on Windows? How would I find why chromium doesn't find the nss libraries?


Last edited by phpdevpad on 14 Mar 2013, 09:16; edited 3 times in total
Post 20 Feb 2013, 18:48
View user's profile Send private message Visit poster's website Reply with quote
phpdevpad



Joined: 12 Jan 2013
Posts: 37
phpdevpad 21 Feb 2013, 11:43
Success! I have uninstalled chromium and installed google-chrome. Then I used strace google-chrome 2>&1 | grep nss to log every system call. Then I copied the nss libraries to the proper path.

Especially in usr/lib64/ these files:

- libmozsqlite3.so
- libsoftokn3.so
- libnssutil3.so
- libnss3.so

Update: libfreebl3.so is needed also: Unfortunatley this is a proprietary function call to load the librariers. Strace doesn't work?

Code:
void LoadNSSLibraries() {
682  // Some NSS libraries are linked dynamically so load them here.
683#if defined(USE_NSS)
684  // Try to search for multiple directories to load the libraries.
685  std::vector<FilePath> paths;
686
687  // Use relative path to Search PATH for the library files.
688  paths.push_back(FilePath());
689
690  // For Debian derivatives NSS libraries are located here.
691  paths.push_back(FilePath("/usr/lib/nss"));
692
693  // Ubuntu 11.10 (Oneiric) places the libraries here.
694#if defined(ARCH_CPU_X86_64)
695  paths.push_back(FilePath("/usr/lib/x86_64-linux-gnu/nss"));
696#elif defined(ARCH_CPU_X86)
697  paths.push_back(FilePath("/usr/lib/i386-linux-gnu/nss"));
698#elif defined(ARCH_CPU_ARMEL)
699  paths.push_back(FilePath("/usr/lib/arm-linux-gnueabi/nss"));
700#endif
701
702  // A list of library files to load.
703  std::vector<std::string> libs;
704  libs.push_back("libsoftokn3.so");
705  libs.push_back("libfreebl3.so");
706
707  // For each combination of library file and path, check for existence and
708  // then load.
709  size_t loaded = 0;
710  for (size_t i = 0; i < libs.size(); ++i) {
711    for (size_t j = 0; j < paths.size(); ++j) {
712      FilePath path = paths[j].Append(libs[i]);
713      base::NativeLibrary lib = base::LoadNativeLibrary(path, NULL);
714      if (lib) {
715        ++loaded;
716        break;
717      }
718    }
719  }
720
721  if (loaded == libs.size()) {
722    VLOG(3) << "NSS libraries loaded.";
723  } else {
724    LOG(ERROR) << "Failed to load NSS libraries.";
725  }
726#endif
727}

    


Last edited by phpdevpad on 22 Feb 2013, 18:43; edited 4 times in total
Post 21 Feb 2013, 11:43
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 22 Feb 2013, 10:13
Post 22 Feb 2013, 10:13
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
phpdevpad



Joined: 12 Jan 2013
Posts: 37
phpdevpad 22 Feb 2013, 12:39
comrade wrote:
Process Monitor http://www.sysinternals.com/


Thank you! Very Happy
Post 22 Feb 2013, 12:39
View user's profile Send private message Visit poster's website Reply with quote
phpdevpad



Joined: 12 Jan 2013
Posts: 37
phpdevpad 14 Mar 2013, 00:45
So I upgraded my os to open suse 12.3 and google-chrome stops working again:

Code:
strace google-chrome 2>&1 | grep nss
open("/opt/google/chrome/libnss3.so", O_RDONLY|O_CLOEXEC) = 3
open("/opt/google/chrome/libnssutil3.so", O_RDONLY|O_CLOEXEC) = 3
stat("/home/xxxx/.pki/nssdb", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
statfs("/home/xxxx/.pki/nssdb", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=12383692, f_bfree=1642933, f_bavail=1013877, f_files=3145728, f_ffree=2673828, f_fsid={-724921752, -1101409358}, f_namelen=255, f_frsize=4096}) = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 8
read(8, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1224
open("/opt/google/chrome/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 8
open("/opt/google/chrome/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 8
open("/opt/google/chrome/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 8
futex(0x7fff985c1974, FUTEX_WAIT_PRIVATE, 1, NULL[3477:3509:0314/014225:ERROR:nss_util.cc(490)] Error initializing NSS with a persistent database (sql:/home/chibo/.pki/nssdb): NSS error code: -8023
[3477:3509:0314/014225:ERROR:nss_util.cc(235)] Error initializing NSS without a persistent database: NSS error code: -8023
[3477:3509:0314/014225:FATAL:nss_util.cc(237)] nss_error=-8023, os_error=0
    
Post 14 Mar 2013, 00:45
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 14 Mar 2013, 05:38
Call Linus Torvalds for technical support.
Post 14 Mar 2013, 05:38
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
phpdevpad



Joined: 12 Jan 2013
Posts: 37
phpdevpad 14 Mar 2013, 12:51
comrade wrote:
Call Linus Torvalds for technical support.


Thanks, the problem is that I have a link google-chrome to /opt/google/chrome/google-chrome which is a wrapper script but my installation somehow is messed up and ld_library_path is wrong.

When I start chrome it's working.
Post 14 Mar 2013, 12:51
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.