Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I recently bought a new Mac which came with macOS Catalina (15.15) installed. I started to set it up the way I wanted to and came across an issue with symbolic links at the file system root (/). I was trying to create a symlink like this...
 Command
sudo ln -s /Volumes/Data\ HD/Personal /Personal


...which promptly gave me an error...ln: /Personal: Read-only file system.

It appears that since 15.15, the root file system is read-only and if you want to have symbolic links or custom mount points at the file system root, you have to use the /etc/synthetic.conf file to create them. From the synthetic.conf man page...
synthetic.conf provides a mechanism for some limited, user-controlled file-creation at /. The synthetic entities described in this file are synthesized by the kernel during early system boot. They are not physically present on the disk, but when the system is booted, they behave as if they were within certain parameters.


Using Terminal.app, I checked if the /etc/synthetic.conf file existed, it didn't in my case. That was ok because I could create it as long as I used sudo to get root privileges...
 Command
sudo vi /etc/synthetic.conf


Then I added the following contents to the file...
 /etc/synthetic.conf
Personal /Volumes/Data HD/Personal


Note the entries have to be TAB separated and the order of entries is symlink name, TAB, target path. Also note that in my case the path had a space in it, there is no need to escape this and if a backslash is used, the symlink will not work correctly - you have to use a literal path here.

Once the file and it's contents were created, I restarted my Mac and the symlink was there as expected...
synthetic_3.png


Continue reading...  

, , ,

During one of the recent releases at work we ran into problems during performance testing of a new feature. This feature worked flawlessly in development and test environments but once hit with a heavy load, it started to manifest itself. Every now and then we'd get the following exception from the JDBC driver - ORA-01555: snapshot too old: rollback segment number with name "" too small.

Oracle Support already has a document that covers this error and the many different causes and solutions for it - Master Note for ORA-1555 Errors (Doc ID 1307334.1), however none of those seemed to have been the cause for the issue in our case.

This was the stack trace we were seeing...
 Exception
Caused by: java.io.IOException : ORA-01555: snapshot too old: rollback segment number with name "" too small
ORA-22924: snapshot too old
at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:252)
at oracle.jdbc.driver.OracleClobReader.read(OracleClobReader.java:192)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.read(BufferedReader.java:182)
...
Caused by: java.sql.SQLException : ORA-01555: snapshot too old: rollback segment number with name "" too small
ORA-22924: snapshot too old
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:441)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:436)
at oracle.jdbc.driver.T4C8TTILob.processError(T4C8TTILob.java:758)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
at oracle.jdbc.driver.T4C8TTIClob.read(T4C8TTIClob.java:249)
at oracle.jdbc.driver.T4CConnection.getChars(T4CConnection.java:3954)
at oracle.sql.CLOB.getChars(CLOB.java:448)
at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:235)
at oracle.jdbc.driver.OracleClobReader.read(OracleClobReader.java:192)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.read(BufferedReader.java:182)
...


So the issue had something to do with CLOBs. After much investigation and collaboration we received some advise about removing the cache option from the CLOB column on the table that we knew was causing this issue.

The cache option can be checked with the following query...
 SQL
SELECT cache, logging
FROM dba_lobs
WHERE table_name = 'your_table';


Originally this was set to YES in our case. To disable/remove the cache option, the following SQL was used...
 SQL
ALTER TABLE your_table
MODIFY LOB (your_clob_column) (NOCACHE LOGGING);


After this statement was executed the cache option was disabled. In our case this made all of the ORA-01555 errors disappear. If it doesn't help you, refer to the Oracle support note mentioned at the start of this post.

-i

, , ,

I've been messing around with how to best connect my two Macs at work so that I can minimise the amount of cables and power supplies. This led to me wonder how to tell how much they are getting in terms of power. The idea was to (hopefully) use one power supply and then some USB-C cables to connect the two Macs - I figured that since one of them is pretty much idle when I'm working on the other, a single power adapter should have been enough.

I tried a few combinations, some worked, some didn't, but that's not what this post is about.

IMG_7257.jpeg IMG_7258.jpeg


To check how much power your Mac is getting, open the System Information app, or click the Apple Menu > About This Mac > System Report...

Then select Hardware > Power and scroll down. You will see details of what your Mac is drawing from the power supply. Here's my experiment of using a USB to micro USB to USB-C cable combination to "charge" the Mac...at 12W I can say it was chewing through battery more than getting any sort of charge...
macospower1.png


Continue reading...  

, , ,

Recently I was sent the Seeed Studio Seeeduino Nano to play around with and I have to say that it's a very nice and cheap alternative to an Arduino Nano. It features the same ATmega328P and is pin-compatible with the Arduino Nano, but replaces the ageing mini-USB with a USB-C connector and also adds an I2C header for the Grove family of modules. That combined with its low price makes it a very attractive replacement and a very nice starting place for anyone wanting to get into Arduino development.

I was also sent the Grove Shield and a couple of Grove modules to check out - the light sensor and the relay. These will be used in an upcoming project. We'll take a quick look at these here but more on these will be available in a future blog post.

So lets have a look at the package...

IMG_6352.jpg IMG_6353.jpg


I've received packages from Seeed Studio a number of times in the past and their packaging has been excellent every time. A nice sturdy box and bubble wrap to protect your order. Nothing was damaged in transit and each of the items inside also had its own retail packaging.

The Nano and its shield were built very well, however I did find that the yellow pin sockets on the shield were soldered on at a funny angle, which made the Nano a little difficult to insert. Apart from that I had no issues with the hardware side at all.

IMG_7113.jpg IMG_7114.jpg


Continue reading...  

, , , ,