Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
- your operating system - which Linux, what version, etc.
- how did you install G. Chrome on the system? Downloaded from your distribution's repos? Or other method?
- start your Google Chrome from a Terminal and COPY/PASTE the output errors here for us.
These items would be helpful to us while trying to troubleshoot your issue.
- start your Google Chrome from a Terminal and COPY/PASTE the output errors here for us.
Agree with this. Many folks moan about how 'noisy' the Chromium-based browsers are in the terminal, but the browser runs a continuous, on-going 'debugging' session all the time it's operational. That being the case, this is the very best output we can have for helping with this kind of issue....
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by prakashkjaya
HI
I am facing Segmentation Fault while installing google chrome pl some help me out
I doubt it. How would Google chrome be segfaulting while you're installing it (before it's actually installed) ?
Either you're installing it via an installer and NOT from software packages, and therefore it's installer program is segfaulting, or you already have installed it and Google Chrome itself is segfaulting.
Either way, it would indicate a problem in the code of either it's installer program (if you were NOT installing it from software packages), or and probably more likely, the code of Google Chrome itself. Either way, unless you know about programming, then it's unlikely there's anything you can do. And it's equally unlikely that anybody here is going to be able to find out exactly where the problem is in the relevant code, and then create a patch for you.
You should also lookup what a "Segmentation Fault" is, as you'll find it means that a program has attempted to access a part of memory that's not a part of that program's own address space. In other words, memory assigned to another program, and NOT to Google Chrome or it's installer program in this case.
The code below is guaranteed to segfault, as the for loop's termination criteria says, "if i is more than or equal to zero, keep running the loop". But the array it's looping through is only 5 elements in size, so once it gets far enough past that, the program below WILL violate it's address space, and therefore cause a segfault.
Of course, as useless as this program would be by itself, and with only the code below, the fix is easy. Just change the loop's condition so it only executes as long as "i" is no more than "5".
Code:
#include <stdio.h>
int main(void) {
int array[] = { 1, 2, 3, 4, 5 };
for( int i = 0; i >= 0; ++i) {
printf("array[%i]\n", array[i]);
}
return 0;
}
This is what happens if you compile and run the program above:
HI
I am facing Segmentation Fault while installing google chrome pl some help me out
Welcome to LQ prakashkjaya,
I'd say a slight addition to the queries in Post #2 would be to, "COPY/PASTE all output errors here for us", regardless of whatever actions you've taken.
Based on your problem description, with no updates as yet, you've encountered this while installing google chrome.
It would be helpful for you to confirm what you were doing, explain the method you were using to perform it, and for you to show the output you're seeing.
Not just the final error report, but the details leading up to it will be helpful.
The size of array you have defined having maximum 5 elements only
array[0] => first element
array[1] => second element
array[2] => third element
array[3] => fourth element
array[4] => fifth and last element
Using for loop you have written:
for( int i = 0; i >= 0; ++i)
This loop being executed from 0 till maximum number of integer.
since we are accessing the element of array out of index.
When that memory being accessed used by some other program, current program receive the signal segmentation fault (SIGSEGV)
for( int i = 0; i >= 0; ++i)
{
printf("array[%i]\n", array[i]);
}
With:
Quote:
for( int i = 0; sizeof(array)/sizeof(int) > i ; ++i)
{
printf( "array[%i] %d\n", i, array[i]);
}
sizeof(array) => 20 (at Linux, HP-UX, SunOS, AIX. In turboc DOS sizeof array being 10 bytes)
sizeof(int) => 4 bytes (at Linux, HP-UX, SunOS, AIX. In turboc DOS sizeof int being 2 bytes)
Number of elements => 20/4 => 5 (0 to 4)
You are presuming that the OP received a core file. Perhaps they did, but they've only ever made their one post.
I'm not sure you receive a core file unless you have your system or terminal set to allow this, such as using "ulimit -c unlimited"
It's also quite possible they've solved this, or moved on to another browser and therefore have decided that their question is no longer of any purpose for them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.