Suramya's Blog : Welcome to my crazy life…

September 30, 2020

How to fix vlc’s Core dumping issue while playing some videos

Over the past 2 days I found that the VLC install on my computer was suddenly having issues playing some of the video files on my computer. Initially I thought that it was a problem with the video file, then I realized that this was also happening with videos that had be playing fine earlier. When I ran vlc from the command line to play the problem video it gave the following output on screen when it crashed:

[00005587b42751b0] dummy interface: using the dummy interface module…
[00007f00c4004980] egl_x11 gl error: cannot select OpenGL API
[00007f00c4004980] gl gl: Initialized libplacebo v2.72.0 (API v72)
[00007f00c402a310] postproc filter error: Unsupported input chroma (VAOP)
[00007f00bd986e50] chain filter error: Too high level of recursion (3)
[00007f00c4028d40] main filter error: Failed to create video converter
[00007f00bd986e50] chain filter error: Too high level of recursion (3)
[00007f00c4028d40] main filter error: Failed to create video converter
[00007f00bd986e50] chain filter error: Too high level of recursion (3)
[00007f00c4028d40] main filter error: Failed to create video converter
[00007f00bd986e50] chain filter error: Too high level of recursion (3)


[00007f00c44265c0] chain filter error: Too high level of recursion (3)
[00007f00c4414240] main filter error: Failed to create video converter
[00007f00bd9020d0] main filter error: Failed to create video converter
[00007f00cc047d70] main video output error: Failed to create video converter
[00007f00cc047d70] main video output error: Failed to compensate for the format changes, removing all filters
[00007f00c4004980] gl gl: Initialized libplacebo v2.72.0 (API v72)

A google search told me that a possible solution was to disable hardware acceleration in the Video settings but that didn’t fix my problem. So I took a look at the kernel.log file in /var/log and I got the following error when the program crashed:

Sep 30 21:11:44 StarKnight kernel: [173399.132554] vlc[91472]: segfault at 28000000204 ip 00007f2d8916c1d8 sp 00007f2d8aa69db0 error 4 in libpostproc.so.55.7.100[7f2d8915c000+1d000]
Sep 30 21:11:44 StarKnight kernel: [173399.132568] Code: 98 48 8d 44 07 20 0f 18 08 8b 44 24 08 4d 8d 0c 1a 4d 8d 04 2b 85 c0 0f 85 cb fd ff ff 4c 8b 6c 24 28 4b 8d 04 29 4b 8d 14 20 <41> 0f 6f 01 43 0f 6f 0c 29 41 0f 7f 00 43 0f 7f 0c 20 43 0f 6f 04

Spent about an hour searching for the solution using the details from the kernel.log but got nowhere. Finally I found a forum post where one of the solutions offered was to remove the vlc configuration files, since I didn’t have any other bright idea’s I renamed the vlc config folder by issuing the following command:

mv ~/.config/vlc ~/.config/vlc_09302020

Then I started vlc and just like that everything started working again. 🙂 Not sure what caused the settings to get borked in the first place but the issue is fixed now so all is well.

– Suramya

September 29, 2020

Mounting a Network drive over ssh in Windows using WinFsp & SSHFS-Win

I have computers running both Windows & Linux and at times I need to share files between them and I have been looking for a convenient way to access the files from my Linux machine from my Windows machine without having to run SAMBA on the Linux. This is because historically SAMBA has been a security nightmare and I don’t want to run extra services on the computer if I can avoid it. Earlier this week I finally found a way to mount my Linux directories on Windows as a network mount over SSH using WinFsp & SSHFS-Win and I have been running it for a couple of days so far without any issues. (So far)

Follow these steps to enable SSHFS-Win on your windows machine:

Install WinFsp (Windows File System Proxy)

WinFsp is a set of software components for Windows computers that allows the creation of user mode file systems similar to FUSE (Filesystem in Userspace) in the Unix/Linux world. You can download it from the project’s GIT repository. The Installation file is available by clicking on the download link under ‘Releases’ near the top right corner of the page. The latest version is WinFsp 2020.1 at the time of this writing.

You install the software by running the MSI file you downloaded and the default options worked for me without modification.

Install SSHFS For Windows

SSHFS-Win is a minimal port of SSHFS to Windows. It is available for download from the project’s Git repository. You can compile from source or download the installation file by clicking on the download link under ‘Releases’ near the top right corner of the page. The latest version is SSHFS-Win 2020 at the time of this writing.

Please note that you will need to have WinFsp installed already before you can install SSHFS-Win successfully.

Usage:

Once you have installed both the software you can start using them and map a network drive to a directory using Windows Explorer or the net use command. Instructions for use are as below (Taken from the project Documentation):

In Windows Explorer select This PC > Map Network Drive and enter the desired drive letter and SSHFS path using the following UNC syntax:

\\sshfs\REMUSER@HOST[\PATH]

The first time you map a particular SSHFS path you will be prompted for the SSH username and password which can be saved using the Windows Credential Manager so that you don’t get prompted for it again. In order to unmap the drive, right-click on the drive icon in Windows Explorer and select Disconnect.


Visual demo of how to Map a Network drive using SSHFS-Win

You can map a network drive from the command line as well using the net use command:

net use X: \\sshfs\suramya@StarKnight

You will then be prompted for the password and once you authenticate you can use the new drive as usual. You can unmap the drive as follows:

net use X: /delete

I find this quite useful and hope you do as well.

Thanks to MakerLab, Department of Computer Science, HKU for pointing me in the correct direction

– Suramya

September 28, 2020

Happy World Tourism Day 2020!

Filed under: Travel/Trips — Suramya @ 3:16 PM

Today is World Tourism day, 2020 and thanks to the current ongoing Pandemic we can’t really travel anywhere to celebrate it. In fact its been over 6 months since we traveled anywhere, so celebrating the World Tourism day in such a situation seems to be a bit of a downer. However just because we can’t travel somewhere doesn’t mean that we can’t celebrate the past trips we have done. So here are some of the Trips that Me & Jani took in the past 4 years:

There were a whole lot of other places we also traveled to which are not listed here, you can check them out here.

Hopefully things will improve soon and we will be back on the road visiting new places and experiencing the best the world has to offer.

– Suramya

September 27, 2020

Using ncdu to Check Disk Space Usage In Linux

One of the common tasks I face on my Linux system is to identify what files/directories are using the most space. The traditional way to find out is to go to the top level directory and run a ‘du -hs *’ (without the quotes) on the directory and then cd into each directory, rinse and repeat. The other option available is to right click on the folder in Dolphin or any other file manager and select Properties. With the same process as before when you go into each directory individually, right click and get the properties. This is very tedious and time consuming.

Instead you can use ncdu (NCurses Disk Usage) for looking at the storage space utilization on your computer as it has a lot of advantages. It is designed to find space hogs on a remote server where you don’t have an entire graphical setup available. It is fast, simple and very easy to use. I have been using it for a while now and absolutely love it.

To Install ncdu on a Debian system, you can issue the following command:

apt-get install ncdu

Once you have it installed, the usage it very simple. Simply open a command prompt and issue the following command:

ncdu

It will start in the current directory and index all the sub-directories under it. The initial scan can take a while depending on the size of the directories under the current directory. But its comparable to the time taken when running du -hs on the directory. Once the program completes its scan, you get a simple ncurses based interface that you can navigate using the keyboard.


ncdu display for my home directory

All directories & are listed with their sizes in human readable format sorted by size with the largest files & directories at the top (in the default view). You can go into a directory by selecting it and hitting enter. The sizes for the subdirectory are immediately shown without having to run additional commands. You can also delete directories & files from within ncdu by hitting the delete key which is a huge timesaver.

If you haven’t tried it out do check it out. You will love it.

– Suramya

September 26, 2020

Source code for multiple Microsoft operating systems including Windows XP & Server 2003 leaked

Filed under: Computer Related,Techie Stuff — Suramya @ 5:58 PM

Windows XP & Windows Server source code leaked online earlier this week and even though this is for an operating system almost 2 decades old this leak is significant. Firstly because some of the core XP components are still in use in Windows 7/8/10. So if a major bug is found in any of those subsystems after people analyze the code then it will have a significant impact on the modern OS’s as well from Redmond. Secondly, It will give everyone a chance to try and understand how the Windows OS works so that they can enhance tools like WINE and other similar tools to have better compatibility with Windows. The other major impact will be on systems that still use XP like ATM’s, embedded systems, point-of-sale, automated teller machines, set-top boxes etc. Those will be hard to upgrade & protect as is some cases the companies that made the device are no longer in business and in other cases the software is installed in devices that are hard to upgrade.

This is not the first time Windows source code has leaked to the internet. In early 2000 a mega torrent of all MS Operating systems going back to MS-DOS was released, it allegedly contained the source code for the following OS’s:

OS from filename Alleged source size (bytes)
——————— —————————
MS-DOS 6 10,600,000
NT 3.5 101,700,000
NT 4 106,200,000
Windows 2000 122,300,000
NT 5 2,360,000,000

Leaked Data from the latest leak


Alleged contents of the Torrent file with MS Source Code.

The leaked code is available for download at most Torrent sites, I am not going to link to it for obvious reasons. If you want to check it out you can go download it, however as always be careful of what you download off the internet as it might have viruses and/or trojans in it. This is especially true if you are downloading the torrent on a Windows machine. Several users on Twitter claim that the source code for the original Xbox is included as well, but the information is varied on this. I haven’t downloaded it myself so can’t say for sure either way.

Keep in mind that the leak was illegal and just because it has leaked doesn’t mean that you can use it to build a clone of Windows XP without written authorization from Microsoft.

Source: ZDNet: Windows XP source code leaked online, on 4chan, out of all places

– Suramya

September 25, 2020

Scientists find molecule to make bio-generated power more efficient.

Filed under: Emerging Tech — Suramya @ 10:06 AM

Producing Electricity is one of the great challenges of the modern world and We have been producing electricity by burning coal, using nuclear fission, Solar power, Wind Power etc etc for decades. However each of these have some drawback or other, and they are all not very portable. To power our portable devices & sensors we use batteries that are a big ecological issue as despite decades of effort most synthetic and molecular electronic materials remain bio-incompatible and nonbiodegradable. Plus the batteries only last for a limited time before needing to be replaced. Solar cells are good but don’t work at night plus we still need to store the power generated which brings us back to the battery problem.

Due to the above mentioned issues, we have been searching for new and improved ways to produce electricity that reduce the ecological impact of power generation. One of the ways explored is to use Microbial fuel cells powered by Bacteria, specifically Geobacter Colonies. Geobacter is a groundwater-dwelling genus of bacteria that lives in the soil beneath our feet and has the fascinating capability of producing electrons as waste much like how we humans generate CO2 while breathing. These electrons are then transmitted through what is essentially a giant snorkel of nanowire made out of a conductive material into the soil around the bacteria. In previous research, Nikhil Malvankar, an assistant professor at Yale University’s Microbial Science Institute in Connecticut and his colleagues found that when the Geobacter microbes are exposed to a small electrode in the lab they automatically assemble into interlinked piles of hundreds of individual microbes, capable of moving electrons through a single shared network. This substantially increases the amount of electricity produced by the microbes.

Now the question they had to answer was that how are the microbes able to transmit electrons through the interlinked piles efficiently so they set about using cutting-edge microscopy techniques to study the phenomenon. The first technique, called high-resolution atomic force microscopy, gathered information about the structure of the nanowires by touching their surface with an extremely sensitive mechanical probe and the second technique, called infrared nanospectroscopy used infrared light which was reflected off the nonowires to identify specific molecules. With these two methods, the researchers saw the “unique fingerprint” of each amino acid in the proteins that make up Geobacter’s nanowires.

During the study the team found that, when stimulated by an electric field Geobacter produced a previously unknown kind of nanowire made of a protein called OmcZ which is made of tiny, metallic building blocks called hemes. This new type of nanowire is over a 1,000 times more efficient in conducting electricity than the normal one. This new research has been published on Aug. 17 in the journal Nature Chemical Biology and it has paved the way to making the production of bio-electronics both cheaper and easier by increasing the power generated by the bacterial colony.

Once we figure out how to replicate this at scale then we will have the ability to generate sustainable power using just the microbes from beneath our feet.

Source: Scientists find ‘secret molecule’ that allows bacteria to exhale electricity

– Suramya

September 24, 2020

Can you spot a troll/bot account?

Filed under: Interesting Sites — Suramya @ 10:29 AM

Nowadays we have programmatic bots being used to spread misinformation & distrust on Social Media, in addition to the Troll’s who are just doing it for the lulz. A troll is a person who starts flame wars or intentionally upsets people on the Internet by posting inflammatory messages in an online community with the intent of provoking readers into displaying emotional responses for the troll’s amusement or a specific gain.

Can you identify these inauthentic accounts? Most people will say yes to the question but in reality it is hard to identify these accounts especially if they are run my competent people. spotthetroll.org is an online game that tests your ability to identify such accounts along with advice on what to look for when consuming Social Media. Its a great quiz and I found it to be quite fun, especially the section on what to look for when viewing social media to spot trolls/bots was very useful.

Each of the following 8 profiles include a brief selection of posts from a single social media account. You decide if each is an authentic account or a professional troll. After each profile, you’ll review the signs that can help you determine if it’s a troll or not.

I got a 5 out of 8. What’s your score?

– Suramya

September 23, 2020

Civvl is Uber for evicting people

Filed under: My Thoughts — Suramya @ 10:16 AM

In the latest attempt by bottom feeders to capitalize on the current pandemic, we have a company called ‘civvl’ which calls itself, the Uber of Evictions. Basically this is a company which is coming in and saying, I’m gonna pay you money to go kick out people from their own houses. To rub more salt on the wound, they actually advertise that “this is a best time to get involved” and “it’s the fastest growing money making gig due to the COVID-19 pandemic” “Literally thousands of process servers are needed in the coming months due courts being backed up in judgements that needs to be served to defendants.” They use a standard language for gig works like flexible hours, be your own boss etc etc.

But imagine how heartless you have to be to literally start a company that will make money by kicking people out from their houses and capitalizing on the fact that the current pandemic will increase the number of people who will have to be evicted. When I initially read about the company I thought that it was a dark joke but unfortunately the company appears to be real and there are people who are signing up for it. I don’t blame them because you need to feed your family and you gotta do what you gotta do… But but coming up with this whole idea, I don’t have words to express myself right now. You need a special type of person to think of something like this and then implement it.

The company is based in the US and is live. I am not going to link to them because they don’t deserve any traffic and the owners need to seriously think about their life choices.

Source: Vice: Gig Economy Company Launches Uber, But for Evicting People

– Suramya

September 22, 2020

Thoughts on a AmItheAsshole forum post and the racism it implies

Filed under: My Thoughts — Suramya @ 10:15 AM

There is an interesting Subreddit, called r/AmItheAsshole (AITA) where people who are not sure if they behaved correctly in a given scenario can post the details of their experience/behavior and ask the Internet for a ruling on whether they behaved correctly or not. The questions can range from “AITA for not cutting my hair for my Sister’s wedding” to “AITA for burning my wife’s Ex-Boyfriend’s pics”. I don’t subscribe to the channel but there are folks I follow on Twitter who do follow and every once in a while they post links to specific posts which are usually way out there (the picture burning I referenced earlier is from one such post). Today I ran across a post where the poster was trying to justify his actions/behavior where he accused his GF’s Indian friend of cheating because she beat him in Scrabble and he couldn’t accept the defeat without assuming that she cheated. The whole post is below for reference:

So my (M23) GF (F23) has this Indian friend (F18) called “Priya”. Priya came to my English speaking country (relevant later) a year back to study. My girlfriend absolutely adores her and Priya soon became my GFs “best friend”. I’m doing English literature and she’s in science (also relevant).

Recently, she invited my GF and I to her place (fluid restrictions here), and had made a bunch of Indian food for us, got some wine. I ate well, the food was good and was having a good time. My GF had apparently bought Priya a scrabble set because Priya had mentioned she loved the game, so GF suggested we all played scrabble.

I was really excited because I knew I’d decimate them both easily. We play, and as the game progresses, it wasn’t me who was leading but Priya. She was making these huge words like “maladies” and “ostensibly”. I was pretty sure she was cheating.

She got up mid game to go to the bathroom and spent about 3 minutes there. I’m pretty sure she was googling words in there. So when she came out, I jokingly told her I knew she was cheating and she asked me what I was talking about.

I told her I know that she’s cheating, and that it’s impossible for someone who’s literally lived only in India all the time to be so good at Scrabble and to have such an extensive English vocabulary.

She didn’t say anything to defend herself but just laughed and told me she wasn’t cheating and we eventually finished the game and went home.

My GF however was extremely upset with me and told me I embarrassed her. When I told her I was being honest, and that there’s no way Priya could’ve beaten me without cheating, She told me I’m a racist and that she’s reconsidering her relationship with me.

So AITA?

The verdict of a majority of the commenters on the post is that ‘YTA’ (You’re The Asshole) and racist to boot. This is a problem I have seen many times when I was in the US and have actually had a person tell me in my Freshmen year (1st year of college) that I couldn’t possibly be from India because I spoke good English and people from India can’t talk in English. To which my answer was that I have been studying in English for the major part of my life and most schools in India teach in English so that the kids are prepared to enter the professional world once they complete their education.

Another instance was when a professor decided that I must have copied my homework paper from somewhere because it was too good to be written by an Indian kid in his freshman class. Luckily for me we had to write another in-class essay on a given topic before the homework was graded and returned. When he graded my inclass paper he realized that I had written both of them and he actually told me that he was going to give me a D on the homework assignment initially because he thought I had cheated but changed his mind after he saw my in-class paper.

There are many such examples, but they mostly have one common denominator: it is usually a White Guy who is offended by the fact that a non-white person beat them in something that they perceive is their forte. I loved the expression on their faces when they realize that they are not the best and it was especially fun in college because after the first year I was writing for the college newspaper & had published articles as well in recognized magazines, so when they found out about my articles it was always a priceless expression.

Have you faced similar issues in your life?

– Suramya

September 21, 2020

Diffblue’s Cover is an AI powered software that can write full Unit Tests for you

Filed under: Computer Related,Computer Software,Interesting Sites — Suramya @ 6:19 PM

Writing Unit Test cases for your software is one of the most boring parts of Software Development even though having accurate tests allows us to develop code faster & with more confidence. Having a full test suite allows a developer to ensure that the changes they have made didn’t break other parts of the project that were working fine earlier. This make Unit tests an essential part of CI/CD (Continuous Integration and Continuous Delivery) pipelines. It is therefore hard to do frequent releases without rigorous unit testing. For example SQLite database engine has 640 times as much testing code as code in the engine itself:

As of version 3.33.0 (2020-08-14), the SQLite library consists of approximately 143.4 KSLOC of C code. (KSLOC means thousands of “Source Lines Of Code” or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 640 times as much test code and test scripts – 91911.0 KSLOC.

Unfortunately, since the tests are boring and don’t give immediate tangible results they are the first casualties when a team is under a time crunch for delivery. This is where Diffblue’s Cover comes into play. Diffblue was spun out of the University of Oxford following their research into how to use AI to write tests automatically. Cover uses AI to write a complete Unit Test including logic that reflects the behavior of the program as compared to the other existing tools that generate Unit Tests based on Templates and depend on the user to provide the logic for the test.

Cover has now been released as a free Community Edition for people to see what the tool can do and try it out themselves. You can download the software from here, and the full datasheet on the software is available here.


Using Cover IntelliJ plug-in to write tests

The software is not foolproof as in it doesn’t identify bugs in the source code. It assumes that the code is working correctly when the tests are added in, so if there is incorrect logic in the code it won’t be able to help you. On the other hand if the original logic was correct then it will let you know if the changes made break any of the existing functionality.

Lodge acknowledged the problem, telling us: “The code might have bugs in it to begin with, and we can’t tell if the current logic that you have in the code is correct or not, because we don’t know what the intent is of the programmer, and there’s no good way today of being able to express intent in a way that a machine could understand.

“That is generally not the problem that most of our customers have. Most of our customers have very few unit tests, and what they typically do is have a set of tests that run functional end-to-end tests that run at the end of the process.”

Lodge’s argument is that if you start with a working application, then let Cover write tests, you have a code base that becomes amenable to high velocity delivery. “Our customers don’t have any unit tests at all, or they have maybe 5 to 10 per cent coverage. Their issue is not that they can’t test their software: they can. They can run end-to-end tests that run right before they cut a release. What they don’t have are unit tests that enable them to run a CI/CD pipeline and be able to ship software every day, so typically our customers are people who can ship software twice a year.”

The software is currently only compatible with Java & IntelliJ but work is ongoing to incorporate other coding languages & IDEs.

Thanks to Theregister.com for the link to the initial story.

– Suramya

Older Posts »

Powered by WordPress