WinDbg processing much faster than CDB - windbg

We are using CDB (command line version of WinDbg) to resolve a cab.
We are using the following command:
cdb -z "abc.cab" -y "SymbolsPath" -G -logo "outputfile" -lines
-c ".kframes 100;!analyze -v;!load msec.dll;!exploitable -v;vertarget;lmv;q"
When I am executing the above command in WinDbg the output is generated within seconds whereas when I use CDB it takes more than a couple of hours to generate the output.
Can anyone suggest what's wrong here ?

Related

Perlbrew fails to install new perl version

I'm attempting to install a new perl version with perlbrew:
perlbrew install perl-5.34.1
but this produces the error:
Fetching perl 5.34.1 as /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz
Download https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz to /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz
ERROR: Failed to download https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz
ERROR: Failed to execute the command
curl --silent --location --fail -o /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz
Reason:
5888
which I'm unable to find on Google searches.
I know that there isn't any typo, because when I intentionally write something wrong, I get a different error.
I have no idea why this is happening, nor to fix it.
EDIT:
the command
curl --location https://cpan.metacpan.org/authors/id/S/SH/SHAY/perl-5.34.1.tar.gz > /dev/null
outputs
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17.3M 100 17.3M 0 0 68.5M 0 --:--:-- --:--:-- --:--:-- 68.5M
How can I install a perl version with perlbrew?
5888 is 0x1700. This could be $? for a program that used exit(0x17), which is to say exit(23). curl uses that exit code when
23 Write error. Curl couldn't write data to a local filesystem or similar.
Sounds like it can't write to /home/703404669/perl5/perlbrew/dists/perl-5.34.1.tar.gz.
If the directory doesn't exist, maybe you didn't properly install perlbrew.
Ways to install perlbrew:
\curl -L https://install.perlbrew.pl | bash
\wget -O - https://install.perlbrew.pl | bash
\fetch -o- https://install.perlbrew.pl | sh
sudo cpan App::perlbrew
perlbrew init
You also need to place a command in your shell's interactive startup script as instructed.
Or maybe you don't have enough disk space. Did you mean to install perlbrew somewhere other than /home/703404669/perl5/perlbrew?
The default perlbrew root directory is ~/perl5/perlbrew, which can be changed by setting PERLBREW_ROOT environment variable before the installation and initialization.
In my case the problem was that it would not create the destination folder for that download. So what fixed it for me was:
mkdir $HOME/perl5/perlbrew/dists -p
In the above case just:
mkdir -p /home/703404669/perl5/perlbrew/dists

How to properly run SpotBugs on a Scala project

I'm trying to get SpotBugs run on Scala project using the SpotBugs CLI.
I installed the CLI like this:
$ curl -L -o /tmp/spotbugs-4.0.3.tgz https://github.com/spotbugs/spotbugs/releases/download/4.0.3/spotbugs-4.0.3.tgz
$ gunzip -c /tmp/spotbugs-4.0.3.tgz | tar xvf - -C /tmp
Then I run it like this
$ time java -jar /tmp/spotbugs-4.0.3/lib/spotbugs.jar -textui -xml:withMessages -html -output target/scala-2.11/spotbugs-report.html vad/target/scala-2.11/projectx-SNAPSHOT-assembly.jar
^Cjava -jar /tmp/spotbugs-4.0.3/lib/spotbugs.jar -textui -xml:withMessages -htm 2462.79s user 135.67s system 130% cpu 33:16.98 total
You can notice that it took more than 30mn without even have finished, I had to halt it.
It obviously seems that SpotBugs is not running properly here, so what am I doing wrong here?

Perl Returning error for ls -l command

I am running a perl script from Nagios to check some files for certain characteristics on a windows machine. When I run the script from Nagios it responds with a result of:
UNKNOWN ERROR - execution of LANG=C ls -l resulted in an error 32512 -
My Code is from this GitHub with a single modification of line 168 so I can use it with windows:
use lib 'C$\Progra~1\Nagios\NRDS_Win\plugins';
The odd thing is the program actually outputs the expected result from the command line on the windows machine.
Here is the command:
check_files.pl -D c:\logs -F Health.log -a '~,300'
Here is an example:
CRITICAL - Health.log is 10703 (more than 300) seconds old - 1
Health.log files found
I modified line that defined LANG=C ls -l in the code but now i just get:
UNKNOWN ERROR - could not execute ls -l - No such file or directory
ls is unix command and by default there is no such command in windows.
If you need it, you can install it e.g. from GNU CoreUtils
You also need to change shell command on line 639 from LANG=C ls -l to just ls -l because in windows you can't set environment variables like that.

OPEN MPI is not working for me

I have installed MPI and GCC seperatly using yum commands,
And now when I use following command:
mpic++ first.c -o first
it says:
bash: mpic++: command not found
Can somebody please help me? I will be very thankful.
Background: I am using centos 6.5, and i am new on linux, however I have good understanding of terminal.
Mpi environment is controlled by module in CentOS so you first have to load the mpi/openmpi-x86_64 module:
module load mpi/openmpi-x86_64
In my case (Centos 7.5) the module command was not available, so I just needed to add the MPI executables to my path.
I found their location by looking at the output of this command:
rpmquery -l openmpi-devel | grep cc
And then added the following to my path:
export PATH=$PATH:/usr/lib64/openmpi/bin/
See it: https://courses.cs.washington.edu/courses/csep524/13wi/mpi/mpi_setup.txt
I also install mpi from yum, but it can't help me. I use:
download mpich
cd
wget http://www.mpich.org/static/tarballs/3.0.2/mpich-3.0.2.tar.gz
tar xzf mpich-3.0.2.tar.gz
build mpich and install in home (can also see mpich-3.0.2/README)
cd mpich-3.0.2
./configure --prefix=$HOME/mpich-install 2>&1 | tee c.txt
make 2>&1 | tee m.txt
make install 2>&1 | tee mi.txt
put mpi binaries (e.g. mpicc, mpirun) on your PATH
add the following line to your ~/.bashrc:
export PATH=$PATH:~/mpich-install/bin
source ~/.bashrc
compile hello world:
mpicc helloworld.c -o helloworld
I get: cc: error: helloworld.c: No such file or director

perl run two system commands error

So in my script I need to make to calls to unix, and I do it via the system command like so:
system "bash -i -c 'addmothernode'";
...
perl code ...
...
system "bash -i -c 'addnode -ip=$_'";
However, whenever I run both of these commands in the same script, for some reason my process is stopped like this:
[1]+ Stopped perl boot.pl
And the script can only be finished when I run fg %1. When I only have one of these system calls in, the perl script finishes successfully. But I need both commands because they depend on each other. Anyone have any ideas about what's going on? Thanks!
UPDATE:
A lot of answers below are saying I don't need to use bash -i to run a system command, and I know typically this is true but I need to use aliases that I have created and if I do not use this the aliases won't be recognized. So I do need bash -i.
This problem is unrelated to perl. You can easily reproduce the situation if you start two bashes in the interactive mode (-i) one after another:
$ cat 1.sh
bash -i -c 'sleep 1'
bash -i -c 'sleep 1'
$ bash 1.sh
[1]+ Stopped bash 1.sh
Of course it would be better to run bash in the non-interactive mode (without -i) or run the program directly, without bash, but if you need for some reason bash -i you can protect its run with setsid:
$ cat 1.sh
setsid bash -i -c 'sleep 1'
setsid bash -i -c 'sleep 1'
echo done
$ bash 1.sh
done
The bash -i means run an interactive shell; so you have two shells both reading from the terminal.
Try removing the -i options.
system "addmothernode";
should work.
To execute a command, bash is not needed. The Perl system function is like the system C function, it calls by default sh.
man system
exec
The standard to which the caller conforms determines which shell is used. See standards(5).
Standard Shell Used
______________________________________________________________
1989 ANSI C, 1990 ISO C, 1999 ISO C, /usr/xpg4/bin/sh
POSIX.1 (1990-2001), SUS, SUSv2, SUSv3,
XPG4
POSIX.1 (1988), SVID3, XPG3, no standard /usr/bin/sh
specified